CAudioManager: Make LogSoundInfo() a const member function

This function doesn't modify internal state.
This commit is contained in:
Lioncash 2020-06-11 13:37:53 -04:00
parent 872c38b384
commit 9ec61de2ca
2 changed files with 12 additions and 12 deletions

View File

@ -84,12 +84,13 @@ SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID) const
return Out;
}
void CAudioManager::LogSoundInfo(uint32 SoundID)
void CAudioManager::LogSoundInfo(uint32 SoundID) const
{
SSoundInfo SoundInfo = GetSoundInfo(SoundID);
const SSoundInfo SoundInfo = GetSoundInfo(SoundID);
if (SoundInfo.DefineID == 0xFFFF)
return;
if (SoundInfo.DefineID != 0xFFFF)
{
if (mpProject->Game() >= EGame::EchoesDemo)
debugf("Sound Name: %s", *SoundInfo.Name);
@ -97,5 +98,4 @@ void CAudioManager::LogSoundInfo(uint32 SoundID)
debugf("Define ID: 0x%04x", SoundInfo.DefineID);
debugf("Audio Group: %s", *SoundInfo.pAudioGroup->Entry()->Name());
debugf("");
}
}

View File

@ -30,7 +30,7 @@ public:
void LoadAssets();
void ClearAssets();
SSoundInfo GetSoundInfo(uint32 SoundID) const;
void LogSoundInfo(uint32 SoundID);
void LogSoundInfo(uint32 SoundID) const;
};
#endif // CAUDIOMANAGER