|
|
@@ -169,38 +169,36 @@ struct URHO3D_API ResourceRefList
|
|
|
static const unsigned VARIANT_VALUE_SIZE = sizeof(void*) * 4;
|
|
|
|
|
|
/// Union for the possible variant values. Objects exceeding the VARIANT_VALUE_SIZE are allocated on the heap.
|
|
|
-struct VariantValue
|
|
|
+union VariantValue
|
|
|
{
|
|
|
- union
|
|
|
- {
|
|
|
- unsigned char storage_[VARIANT_VALUE_SIZE];
|
|
|
- int int_;
|
|
|
- bool bool_;
|
|
|
- float float_;
|
|
|
- Vector2 vector2_;
|
|
|
- Vector3 vector3_;
|
|
|
- Vector4 vector4_;
|
|
|
- Quaternion quaterion_;
|
|
|
- Color color_;
|
|
|
- String string_;
|
|
|
- PODVector<unsigned char> buffer_;
|
|
|
- void* voidPtr_;
|
|
|
- ResourceRef resourceRef_;
|
|
|
- ResourceRefList resourceRefList_;
|
|
|
- VariantVector variantVector_;
|
|
|
- VariantMap variantMap_;
|
|
|
- IntRect intRect_;
|
|
|
- IntVector2 intVector2_;
|
|
|
- WeakPtr<RefCounted> weakPtr_;
|
|
|
- Matrix3* matrix3_;
|
|
|
- Matrix3x4* matrix3x4_;
|
|
|
- Matrix4* matrix4_;
|
|
|
- double double_;
|
|
|
- StringVector stringVector_;
|
|
|
- Rect rect_;
|
|
|
- IntVector3 intVector3_;
|
|
|
- long long int64_;
|
|
|
- };
|
|
|
+ unsigned char storage_[VARIANT_VALUE_SIZE];
|
|
|
+ int int_;
|
|
|
+ bool bool_;
|
|
|
+ float float_;
|
|
|
+ Vector2 vector2_;
|
|
|
+ Vector3 vector3_;
|
|
|
+ Vector4 vector4_;
|
|
|
+ Quaternion quaterion_;
|
|
|
+ Color color_;
|
|
|
+ String string_;
|
|
|
+ PODVector<unsigned char> buffer_;
|
|
|
+ void* voidPtr_;
|
|
|
+ ResourceRef resourceRef_;
|
|
|
+ ResourceRefList resourceRefList_;
|
|
|
+ VariantVector variantVector_;
|
|
|
+ VariantMap variantMap_;
|
|
|
+ IntRect intRect_;
|
|
|
+ IntVector2 intVector2_;
|
|
|
+ WeakPtr<RefCounted> weakPtr_;
|
|
|
+ Matrix3* matrix3_;
|
|
|
+ Matrix3x4* matrix3x4_;
|
|
|
+ Matrix4* matrix4_;
|
|
|
+ double double_;
|
|
|
+ StringVector stringVector_;
|
|
|
+ Rect rect_;
|
|
|
+ IntVector3 intVector3_;
|
|
|
+ long long int64_;
|
|
|
+
|
|
|
/// Construct uninitialized.
|
|
|
VariantValue() { }
|
|
|
/// Non-copyable.
|