Преглед на файлове

add fast int to object lookup.

Jeff Hutchinson преди 4 години
родител
ревизия
db047275f1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Engine/source/console/compiledEval.cpp

+ 1 - 1
Engine/source/console/compiledEval.cpp

@@ -1824,7 +1824,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
             // Optimization: If we're an integer, we can lookup the value by SimObjectId
             const ConsoleValue& simObjectLookupValue = callArgv[1];
             if (simObjectLookupValue.getType() == ConsoleValueType::cvInteger)
-               gEvalState.thisObject = Sim::findObject(static_cast<SimObjectId>(simObjectLookupValue.getInt()));
+               gEvalState.thisObject = Sim::findObject(static_cast<SimObjectId>(simObjectLookupValue.getFastInt()));
             else
             {
                SimObject *foundObject = Sim::findObject(simObjectLookupValue.getString());