Skip to content

Commit

Permalink
Fix perfect fowards
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylion007 committed Nov 7, 2022
1 parent 5a0df03 commit 6fa9a50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/AssetLib/FBX/FBXExportNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ class FBX::Node {
public: // functions to add properties or children
// add a single property to the node
template <typename T>
void AddProperty(T value) {
void AddProperty(T&& value) {
properties.emplace_back(std::forward<T>(value));
}

// convenience function to add multiple properties at once
template <typename T, typename... More>
void AddProperties(T value, More... more) {
void AddProperties(T&& value, More&&... more) {
properties.emplace_back(std::forward<T>(value));
AddProperties(std::forward<More>(more)...);
}
Expand All @@ -115,7 +115,7 @@ class FBX::Node {
template <typename... More>
void AddChild(
const std::string& name,
More... more
More&&... more
) {
FBX::Node c(name);
c.AddProperties(std::forward<More>(more)...);
Expand Down Expand Up @@ -147,7 +147,7 @@ class FBX::Node {
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>(more)...);
Expand Down

0 comments on commit 6fa9a50

Please sign in to comment.