Browse Source

Inline the CodeToSTE call

James Urquhart 12 years ago
parent
commit
a375bd3fe3
2 changed files with 9 additions and 10 deletions
  1. 0 9
      engine/source/console/compiler.cc
  2. 9 1
      engine/source/console/compiler.h

+ 0 - 9
engine/source/console/compiler.cc

@@ -71,15 +71,6 @@ namespace Compiler
    void setBreakCodeBlock(CodeBlock *cb)  { gCurBreakBlock = cb;   }
 
    //------------------------------------------------------------
-
-   StringTableEntry CodeToSTE(U32 *code, U32 ip)
-   {
-#ifdef TORQUE_64
-      return (StringTableEntry)(*((U64*)(code+ip)));
-#else
-      return (StringTableEntry)(*(code+ip));
-#endif
-   }
    
    void evalSTEtoCode(StringTableEntry ste, U32 ip, U32 *codeStream)
    {

+ 9 - 1
engine/source/console/compiler.h

@@ -212,7 +212,15 @@ namespace Compiler
 
    //------------------------------------------------------------
    
-   extern StringTableEntry CodeToSTE(U32 *code, U32 ip);
+   inline StringTableEntry CodeToSTE(U32 *code, U32 ip)
+   {
+#ifdef TORQUE_64
+      return (StringTableEntry)(*((U64*)(code+ip)));
+#else
+      return (StringTableEntry)(*(code+ip));
+#endif
+   }
+   
    extern void (*STEtoCode)(StringTableEntry ste, U32 ip, U32 *codeStream);
 
    void evalSTEtoCode(StringTableEntry ste, U32 ip, U32 *codeStream);