Skip to content

Commit

Permalink
Moving a temporary object prevents copy elision. (open-telemetry#205)
Browse files Browse the repository at this point in the history
Caught by: -Wpessimizing-move
  • Loading branch information
g-easy committed Jul 23, 2020
1 parent 8001170 commit e616636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/include/opentelemetry/context/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Context
{
if (first)
{
*node = std::move(DataList(iter.first, iter.second));
*node = DataList(iter.first, iter.second);
first = false;
}
else
Expand Down

0 comments on commit e616636

Please sign in to comment.