Skip to content

Commit dd49723

Browse files
author
Jimmy Jia
committed
Use emplace_back instead of push_back
For #57
1 parent 38dc23f commit dd49723

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cppwamp/include/cppwamp/internal/varianttuple.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void assignFromTuple(Array&, std::tuple<Ts...>&&) {}
4646
template<std::size_t N = 0, typename... Ts, EnableIfTupleElement<N, Ts...> = 0>
4747
void assignFromTuple(Array& array, std::tuple<Ts...>&& tuple)
4848
{
49-
array.push_back(Variant());
49+
array.emplace_back();
5050
assignFromTupleElement(array.back(), std::get<N>(std::move(tuple)));
5151
assignFromTuple<N+1, Ts...>(array, std::move(tuple));
5252
}

0 commit comments

Comments
 (0)