CAudioManager: Make GetSoundInfo() a const member function

This doesn't modify internal member state.
This commit is contained in:
Lioncash 2020-06-11 13:35:36 -04:00
parent 9692a064cd
commit 872c38b384
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ void CAudioManager::ClearAssets()
mSfxIdMap.clear();
}
SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID)
SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID) const
{
SSoundInfo Out;
Out.SoundID = SoundID;
@ -74,7 +74,7 @@ SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID)
if (Out.DefineID != 0xFFFF)
{
auto Iter = mSfxIdMap.find(Out.DefineID);
if (Iter != mSfxIdMap.end())
if (Iter != mSfxIdMap.cend())
Out.pAudioGroup = Iter->second;
if (mpProject->Game() >= EGame::EchoesDemo)

View File

@ -29,7 +29,7 @@ public:
explicit CAudioManager(CGameProject *pProj);
void LoadAssets();
void ClearAssets();
SSoundInfo GetSoundInfo(uint32 SoundID);
SSoundInfo GetSoundInfo(uint32 SoundID) const;
void LogSoundInfo(uint32 SoundID);
};