diff --git a/code/AssetLib/FBX/FBXExportNode.h b/code/AssetLib/FBX/FBXExportNode.h index bad3c9e4d..62c06e16b 100644 --- a/code/AssetLib/FBX/FBXExportNode.h +++ b/code/AssetLib/FBX/FBXExportNode.h @@ -85,24 +85,24 @@ public: // constructors // convenience template to construct with properties directly template - Node(const std::string& n, const More... more) + Node(const std::string& n, More&&... more) : name(n) , properties() , children() , force_has_children(false) { - AddProperties(more...); + AddProperties(std::forward(more)...); } public: // functions to add properties or children // add a single property to the node template - void AddProperty(T value) { + void AddProperty(T&& value) { properties.emplace_back(std::forward(value)); } // convenience function to add multiple properties at once template - void AddProperties(T value, More... more) { + void AddProperties(T&& value, More&&... more) { properties.emplace_back(std::forward(value)); AddProperties(std::forward(more)...); } @@ -115,7 +115,7 @@ public: // functions to add properties or children template void AddChild( const std::string& name, - More... more + More&&... more ) { FBX::Node c(name); c.AddProperties(std::forward(more)...); @@ -147,7 +147,7 @@ public: // support specifically for dealing with Properties70 nodes const std::string& type, const std::string& type2, const std::string& flags, - More... more + More&&... more ) { Node n("P"); n.AddProperties(name, type, type2, flags, std::forward(more)...); diff --git a/code/AssetLib/glTF/glTFCommon.h b/code/AssetLib/glTF/glTFCommon.h index db25e2172..edc3c7e03 100644 --- a/code/AssetLib/glTF/glTFCommon.h +++ b/code/AssetLib/glTF/glTFCommon.h @@ -245,12 +245,9 @@ struct Nullable { Nullable() : isPresent(false) {} - Nullable(const T &val) : + Nullable(T &val) : value(val), isPresent(true) {} - Nullable(T &&val) : - value(std::move(val)), - isPresent(true) {} }; //! A reference to one top-level object, which is valid