Commit 2691d10c authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Use std::move() to avoid object copying

parent 517ff41d
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <map> #include <map>
#include <optional> #include <optional>
#include <string_view> #include <string_view>
#include <utility>
class ProfilerOperationRegistry final class ProfilerOperationRegistry final
{ {
...@@ -18,7 +19,7 @@ class ProfilerOperationRegistry final ...@@ -18,7 +19,7 @@ class ProfilerOperationRegistry final
struct Entry final struct Entry final
{ {
explicit Entry(std::string_view description, Operation operation) noexcept explicit Entry(std::string_view description, Operation operation) noexcept
: description_(description), operation_(operation) : description_(description), operation_(std::move(operation))
{ {
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment