Skip to content

Commit 3bce9d0

Browse files
committed
util: fix -Wpessimizing-move warning
/ci_container_base/src/ipc/libmultiprocess/src/mp/util.cpp:74:12: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] 74 | return std::move(buffer.str()); | ^ /ci_container_base/src/ipc/libmultiprocess/src/mp/util.cpp:74:12: note: remove std::move call here 74 | return std::move(buffer.str()); | ^~~~~~~~~~ ~
1 parent f09c501 commit 3bce9d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mp/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ std::string ThreadName(const char* exe_name)
7171
buffer << std::this_thread::get_id();
7272
#endif
7373

74-
return std::move(buffer.str());
74+
return std::move(buffer).str();
7575
}
7676

7777
std::string LogEscape(const kj::StringTree& string)

0 commit comments

Comments
 (0)