Fix arg name

This commit is contained in:
Wojtek Figat
2023-06-18 18:36:58 +02:00
parent 3b642c0370
commit dd8817582a
2 changed files with 4 additions and 3 deletions

View File

@@ -874,15 +874,15 @@ ScriptingObject* Scripting::TryFindObject(Guid id, MClass* type)
return result; return result;
} }
ScriptingObject* Scripting::TryFindObject(MClass* mclass) ScriptingObject* Scripting::TryFindObject(MClass* type)
{ {
if (mclass == nullptr) if (type == nullptr)
return nullptr; return nullptr;
ScopeLock lock(_objectsLocker); ScopeLock lock(_objectsLocker);
for (auto i = _objectsDictionary.Begin(); i.IsNotEnd(); ++i) for (auto i = _objectsDictionary.Begin(); i.IsNotEnd(); ++i)
{ {
const auto obj = i->Value; const auto obj = i->Value;
if (obj->GetClass() == mclass) if (obj->GetClass() == type)
return obj; return obj;
} }
return nullptr; return nullptr;

View File

@@ -138,6 +138,7 @@ public:
/// <summary> /// <summary>
/// Tries to find the object by the given class. /// Tries to find the object by the given class.
/// </summary> /// </summary>
/// <param name="type">The type of the object to find.</param>
/// <returns>The found object or null if missing.</returns> /// <returns>The found object or null if missing.</returns>
static ScriptingObject* TryFindObject(MClass* type); static ScriptingObject* TryFindObject(MClass* type);