Browse Source

Added missing member copy in gltf2::ExtrasValue ctor.

Bengt Rosenberger 3 years ago
parent
commit
cb4d0ab7aa
1 changed files with 3 additions and 4 deletions
  1. 3 4
      code/AssetLib/glTF2/glTF2Asset.h

+ 3 - 4
code/AssetLib/glTF2/glTF2Asset.h

@@ -378,9 +378,7 @@ struct CustomExtension {
     CustomExtension& operator=(const CustomExtension&) = default;
     CustomExtension& operator=(const CustomExtension&) = default;
 };
 };
 
 
-struct ExtrasValue;
-
-//! Represents a union of metadata values
+//! Represents a union of metadata values. Only one nullable is supposed to be set.
 struct ExtrasValue {
 struct ExtrasValue {
     std::string name;
     std::string name;
 
 
@@ -398,6 +396,7 @@ struct ExtrasValue {
     ExtrasValue(const ExtrasValue& other) :
     ExtrasValue(const ExtrasValue& other) :
         name(other.name),
         name(other.name),
         mStringValue(other.mStringValue),
         mStringValue(other.mStringValue),
+        mFloatValue(other.mFloatValue),
         mDoubleValue(other.mDoubleValue),
         mDoubleValue(other.mDoubleValue),
         mUint64Value(other.mUint64Value),
         mUint64Value(other.mUint64Value),
         mInt32Value(other.mInt32Value),
         mInt32Value(other.mInt32Value),
@@ -406,7 +405,7 @@ struct ExtrasValue {
     }
     }
 };
 };
 
 
-//! Represents metadata in an glTF object
+//! Represents metadata in an glTF2 object
 struct Extras {
 struct Extras {
     std::vector<ExtrasValue> mValues;
     std::vector<ExtrasValue> mValues;