diff --git a/src/Core/CAudioManager.cpp b/src/Core/CAudioManager.cpp index 167e70ed..dc056927 100644 --- a/src/Core/CAudioManager.cpp +++ b/src/Core/CAudioManager.cpp @@ -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) diff --git a/src/Core/CAudioManager.h b/src/Core/CAudioManager.h index 5a7d052e..7e9013b7 100644 --- a/src/Core/CAudioManager.h +++ b/src/Core/CAudioManager.h @@ -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); };