Procházet zdrojové kódy

Engine API: Pass structs by reference

Lukas Joergensen před 6 roky
rodič
revize
0b5fd8db6e
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      Engine/source/console/engineTypes.h

+ 2 - 2
Engine/source/console/engineTypes.h

@@ -240,12 +240,12 @@ struct _EngineStructTypeTraits
    typedef void SuperType;
    
    // Structs get passed in as pointers and passed out as full copies.
-   typedef T ArgumentValueType;
+   typedef T* ArgumentValueType;
    typedef T ReturnValueType;
    typedef T DefaultArgumentValueStoreType;
 
    typedef ReturnValueType ReturnValue;
-   static ValueType ArgumentToValue( ArgumentValueType val ) { return val; }
+   static ValueType ArgumentToValue( ArgumentValueType val ) { return *val; }
 
    static const EngineTypeInfo* const TYPEINFO;
 };