Fix arg name
This commit is contained in:
@@ -874,15 +874,15 @@ ScriptingObject* Scripting::TryFindObject(Guid id, MClass* type)
|
||||
return result;
|
||||
}
|
||||
|
||||
ScriptingObject* Scripting::TryFindObject(MClass* mclass)
|
||||
ScriptingObject* Scripting::TryFindObject(MClass* type)
|
||||
{
|
||||
if (mclass == nullptr)
|
||||
if (type == nullptr)
|
||||
return nullptr;
|
||||
ScopeLock lock(_objectsLocker);
|
||||
for (auto i = _objectsDictionary.Begin(); i.IsNotEnd(); ++i)
|
||||
{
|
||||
const auto obj = i->Value;
|
||||
if (obj->GetClass() == mclass)
|
||||
if (obj->GetClass() == type)
|
||||
return obj;
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
@@ -138,6 +138,7 @@ public:
|
||||
/// <summary>
|
||||
/// Tries to find the object by the given class.
|
||||
/// </summary>
|
||||
/// <param name="type">The type of the object to find.</param>
|
||||
/// <returns>The found object or null if missing.</returns>
|
||||
static ScriptingObject* TryFindObject(MClass* type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user