CScriptLayer: Make pointer parameter in RemoveInstance() const

The pointed to data isn't modified here, so we can mark the parameter as
const to allow it to be used in more scenarios.
This commit is contained in:
Lioncash 2020-06-28 00:50:52 -04:00
parent c6263433a9
commit 8969685254
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public:
}
}
void RemoveInstance(CScriptObject *pInstance)
void RemoveInstance(const CScriptObject *pInstance)
{
const auto it = std::find_if(mInstances.cbegin(), mInstances.cend(),
[pInstance](const auto* instance) { return instance == pInstance; });