From 2fe623b7616e49ebda19be7607a8de6b91dd6675 Mon Sep 17 00:00:00 2001 From: Lukas Joergensen Date: Sat, 21 Apr 2018 09:23:38 +0200 Subject: [PATCH] Pass structs by value, not by reference, in EngineAPI. This simplifies call-layout through EngineAPI --- Engine/source/console/engineTypes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/source/console/engineTypes.h b/Engine/source/console/engineTypes.h index 2217ee770..51d2ef84d 100644 --- a/Engine/source/console/engineTypes.h +++ b/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; };