From 0b5fd8db6ecfc2dda84f1c427a241cabb14174fe Mon Sep 17 00:00:00 2001 From: Lukas Joergensen Date: Sat, 3 Aug 2019 13:46:07 +0200 Subject: [PATCH] Engine API: Pass structs by reference --- Engine/source/console/engineTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/console/engineTypes.h b/Engine/source/console/engineTypes.h index fbce1afd6..e6bb3a6ea 100644 --- a/Engine/source/console/engineTypes.h +++ b/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; };