瀏覽代碼

Pass structs by value, not by reference, in EngineAPI. This simplifies call-layout through EngineAPI

Lukas Joergensen 7 年之前
父節點
當前提交
2fe623b761
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Engine/source/console/engineTypes.h

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

@@ -236,16 +236,16 @@ template< typename T >
 struct _EngineStructTypeTraits
 {
    typedef T Type;
-   typedef const T& ValueType;
+   typedef const T ValueType;
    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;
 };