Skip to content

Commit

Permalink
Do not use std::move as it prevents from copy ellision
Browse files Browse the repository at this point in the history
Relates #169
  • Loading branch information
GeorgyKirichenko authored and GeorgyKirichenko committed Apr 15, 2024
1 parent 31fd026 commit 499e193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/generation.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class generation_manager

[[nodiscard]] std::shared_lock<std::shared_mutex> current_lock_guard() const
{
return std::move(std::shared_lock(current_mutex));
return std::shared_lock(current_mutex);
}

const Type& current() const
Expand Down

0 comments on commit 499e193

Please sign in to comment.