mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Reduced the size in bytes of Variant slightly by allowing the compiler to better pack its member variables together in memory.
This commit is contained in:
@@ -93,10 +93,13 @@ private:
|
|||||||
FUSERDATA,
|
FUSERDATA,
|
||||||
NIL,
|
NIL,
|
||||||
TABLE
|
TABLE
|
||||||
} type;
|
};
|
||||||
|
|
||||||
static const int MAX_SMALL_STRING_LENGTH = 15;
|
static const int MAX_SMALL_STRING_LENGTH = 15;
|
||||||
|
|
||||||
|
Type type;
|
||||||
|
love::Type udatatype;
|
||||||
|
|
||||||
union Data
|
union Data
|
||||||
{
|
{
|
||||||
bool boolean;
|
bool boolean;
|
||||||
@@ -111,8 +114,6 @@ private:
|
|||||||
} smallstring;
|
} smallstring;
|
||||||
} data;
|
} data;
|
||||||
|
|
||||||
love::Type udatatype;
|
|
||||||
|
|
||||||
}; // Variant
|
}; // Variant
|
||||||
} // love
|
} // love
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user