mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Use perfect forwarding in Sound_Buffer ctor
This commit is contained in:
parent
944033db4e
commit
24f8a2db27
@ -25,8 +25,9 @@ namespace MWSound
|
|||||||
class Sound_Buffer
|
class Sound_Buffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sound_Buffer(std::string resname, float volume, float mindist, float maxdist)
|
template <class T>
|
||||||
: mResourceName(std::move(resname)), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist)
|
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; }
|
const std::string& getResourceName() const noexcept { return mResourceName; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user