CAudioManager: Make GetSoundInfo() a const member function
This doesn't modify internal member state.
This commit is contained in:
parent
9692a064cd
commit
872c38b384
|
@ -64,7 +64,7 @@ void CAudioManager::ClearAssets()
|
||||||
mSfxIdMap.clear();
|
mSfxIdMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID)
|
SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID) const
|
||||||
{
|
{
|
||||||
SSoundInfo Out;
|
SSoundInfo Out;
|
||||||
Out.SoundID = SoundID;
|
Out.SoundID = SoundID;
|
||||||
|
@ -74,7 +74,7 @@ SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID)
|
||||||
if (Out.DefineID != 0xFFFF)
|
if (Out.DefineID != 0xFFFF)
|
||||||
{
|
{
|
||||||
auto Iter = mSfxIdMap.find(Out.DefineID);
|
auto Iter = mSfxIdMap.find(Out.DefineID);
|
||||||
if (Iter != mSfxIdMap.end())
|
if (Iter != mSfxIdMap.cend())
|
||||||
Out.pAudioGroup = Iter->second;
|
Out.pAudioGroup = Iter->second;
|
||||||
|
|
||||||
if (mpProject->Game() >= EGame::EchoesDemo)
|
if (mpProject->Game() >= EGame::EchoesDemo)
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
explicit CAudioManager(CGameProject *pProj);
|
explicit CAudioManager(CGameProject *pProj);
|
||||||
void LoadAssets();
|
void LoadAssets();
|
||||||
void ClearAssets();
|
void ClearAssets();
|
||||||
SSoundInfo GetSoundInfo(uint32 SoundID);
|
SSoundInfo GetSoundInfo(uint32 SoundID) const;
|
||||||
void LogSoundInfo(uint32 SoundID);
|
void LogSoundInfo(uint32 SoundID);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue