Skip to content

Commit

Permalink
remove std::move when opening an event
Browse files Browse the repository at this point in the history
  • Loading branch information
Tessa Todorowski committed Jul 23, 2024
1 parent 967f4fc commit 7e5e782
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/perf/counter/group/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ Reader<T>::Reader(ExecutionScope scope, bool enable_on_exec)
{
if (scope.is_cpu())
{
counter_leader_ = std::move(counter_collection_.leader.open(scope.as_cpu()));
counter_leader_ = counter_collection_.leader.open(scope.as_cpu());
}
else
{
counter_leader_ = std::move(counter_collection_.leader.open(scope.as_thread()));
counter_leader_ = counter_collection_.leader.open(scope.as_thread());
}
}
catch (const std::system_error& e)
Expand Down Expand Up @@ -101,13 +101,11 @@ Reader<T>::Reader(ExecutionScope scope, bool enable_on_exec)
{
if (scope.is_cpu())
{
counter =
std::move(counter_ev.open(scope.as_cpu(), counter_leader_.get_fd()));
counter = counter_ev.open(scope.as_cpu(), counter_leader_.get_fd());
}
else
{
counter =
std::move(counter_ev.open(scope.as_thread(), counter_leader_.get_fd()));
counter = counter_ev.open(scope.as_thread(), counter_leader_.get_fd());
}
}
catch (const std::system_error& e)
Expand Down
4 changes: 2 additions & 2 deletions src/perf/counter/userspace/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ Reader<T>::Reader(ExecutionScope scope)

if (scope.is_cpu())
{
counter = std::move(event.open(scope.as_cpu()));
counter = event.open(scope.as_cpu());
}
else
{
counter = std::move(event.open(scope.as_thread()));
counter = event.open(scope.as_thread());
}
}

Expand Down

0 comments on commit 7e5e782

Please sign in to comment.