1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 06:45:32 +00:00

Use perfect forwarding in Sound_Buffer ctor

This commit is contained in:
elsid 2021-01-09 14:07:30 +01:00
parent 944033db4e
commit 24f8a2db27
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -25,8 +25,9 @@ namespace MWSound
class Sound_Buffer
{
public:
Sound_Buffer(std::string resname, float volume, float mindist, float maxdist)
: mResourceName(std::move(resname)), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist)
template <class T>
Sound_Buffer(T&& resname, float volume, float mindist, float maxdist)
: mResourceName(std::forward<T>(resname)), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist)
{}
const std::string& getResourceName() const noexcept { return mResourceName; }