forked from mirror/openmw-tes3mp
Move the soundlist when updating a Ptr instead of copying
This commit is contained in:
parent
605c937572
commit
abe80f5868
1 changed files with 3 additions and 3 deletions
|
@ -1203,16 +1203,16 @@ namespace MWSound
|
|||
SoundMap::iterator snditer = mActiveSounds.find(old);
|
||||
if(snditer != mActiveSounds.end())
|
||||
{
|
||||
SoundBufferRefPairList sndlist = snditer->second;
|
||||
SoundBufferRefPairList sndlist = std::move(snditer->second);
|
||||
mActiveSounds.erase(snditer);
|
||||
mActiveSounds[updated] = sndlist;
|
||||
mActiveSounds.emplace(updated, std::move(sndlist));
|
||||
}
|
||||
SaySoundMap::iterator sayiter = mActiveSaySounds.find(old);
|
||||
if(sayiter != mActiveSaySounds.end())
|
||||
{
|
||||
Stream *stream = sayiter->second;
|
||||
mActiveSaySounds.erase(sayiter);
|
||||
mActiveSaySounds[updated] = stream;
|
||||
mActiveSaySounds.emplace(updated, stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue