Skip to content

Commit

Permalink
Fix clang-tidy diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Feb 2, 2024
1 parent 25f5ea0 commit 2f631a3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <list>
#include <memory>
#include <stack>
#include <utility>

/**
* @brief Manager to control the lifetime of shared resources.
Expand Down Expand Up @@ -58,8 +59,8 @@ class ResourceManager {
std::shared_ptr<T> m_resource;

public:
explicit ResourceLockImpl(std::shared_ptr<T> const &resource)
: m_resource(resource) {}
explicit ResourceLockImpl(std::shared_ptr<T> resource)
: m_resource(std::move(resource)) {}
~ResourceLockImpl() override { m_resource.reset(); }
};

Expand Down

0 comments on commit 2f631a3

Please sign in to comment.