Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/cpptoml.h
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ inline std::shared_ptr<base> array::clone() const
result->reserve(values_.size());
for (const auto& ptr : values_)
result->values_.push_back(ptr->clone());
return result;
return std::move(result);
}

inline std::shared_ptr<base> table_array::clone() const
Expand All @@ -1731,15 +1731,15 @@ inline std::shared_ptr<base> table_array::clone() const
result->reserve(array_.size());
for (const auto& ptr : array_)
result->array_.push_back(ptr->clone()->as_table());
return result;
return std::move(result);
}

inline std::shared_ptr<base> table::clone() const
{
auto result = make_table();
for (const auto& pr : map_)
result->insert(pr.first, pr.second->clone());
return result;
return std::move(result);
}

/**
Expand Down Expand Up @@ -2710,15 +2710,15 @@ class parser
eat_numbers();
auto val = parse_int(start, check_it, 8, "0");
it = start;
return val;
return std::move(val);
}
else // if (base == 'b')
{
auto start = check_it;
eat_numbers();
auto val = parse_int(start, check_it, 2);
it = start;
return val;
return std::move(val);
}
}

Expand Down