diff --git a/apps/openmw/mwsound/sound_buffer.hpp b/apps/openmw/mwsound/sound_buffer.hpp index e623923003..02e3c499b8 100644 --- a/apps/openmw/mwsound/sound_buffer.hpp +++ b/apps/openmw/mwsound/sound_buffer.hpp @@ -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 + Sound_Buffer(T&& resname, float volume, float mindist, float maxdist) + : mResourceName(std::forward(resname)), mVolume(volume), mMinDist(mindist), mMaxDist(maxdist) {} const std::string& getResourceName() const noexcept { return mResourceName; }