Browse Source

Reduced the size in bytes of Variant slightly by allowing the compiler to better pack its member variables together in memory.

Alex Szpakowski 9 years ago
parent
commit
5d7425b60e
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/common/Variant.h

+ 4 - 3
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