Fix arg name
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user