Skip to content

Commit e616636

Browse files
authored
Moving a temporary object prevents copy elision. (open-telemetry#205)
Caught by: -Wpessimizing-move
1 parent 8001170 commit e616636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/include/opentelemetry/context/context.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class Context
116116
{
117117
if (first)
118118
{
119-
*node = std::move(DataList(iter.first, iter.second));
119+
*node = DataList(iter.first, iter.second);
120120
first = false;
121121
}
122122
else

0 commit comments

Comments
 (0)