From 5d7425b60e8705e771f015bc1619ba6b56fe0274 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 14 Feb 2016 19:51:55 -0400 Subject: [PATCH] Reduced the size in bytes of Variant slightly by allowing the compiler to better pack its member variables together in memory. --- src/common/Variant.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/Variant.h b/src/common/Variant.h index cc99f198b..9a860a73c 100644 --- a/src/common/Variant.h +++ b/src/common/Variant.h @@ -93,10 +93,13 @@ private: FUSERDATA, NIL, TABLE - } type; + }; static const int MAX_SMALL_STRING_LENGTH = 15; + Type type; + love::Type udatatype; + union Data { bool boolean; @@ -111,8 +114,6 @@ private: } smallstring; } data; - love::Type udatatype; - }; // Variant } // love