2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-06 00:37:26 +00:00

refactor: use std ranges functions where applicable

This commit is contained in:
Jan
2024-03-24 20:49:15 +01:00
parent 132cccb971
commit 239001e6f2
42 changed files with 251 additions and 295 deletions

View File

@@ -46,12 +46,11 @@ public:
void AddSound(const std::string& soundFilePath, unsigned int soundId, bool looping, bool streamed) override
{
auto itr = std::find_if(this->m_sounds.begin(),
this->m_sounds.end(),
[soundId](SoundBankEntryInfo& entry)
{
return entry.m_sound_id == soundId;
});
auto itr = std::ranges::find_if(this->m_sounds,
[soundId](SoundBankEntryInfo& entry)
{
return entry.m_sound_id == soundId;
});
if (itr == this->m_sounds.end())
{