Skip to content

Commit

Permalink
fixing reorder error
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan511 committed Feb 7, 2024
1 parent 14e182e commit d927e99
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ namespace hpx::synchronization {
template <typename RangeMutex>
class range_guard
{
std::reference_wrapper<RangeMutex> mutex_ref;
std::size_t lock_id;
std::reference_wrapper<RangeMutex> mutex_ref;

public:
range_guard(RangeMutex& mtx, std::size_t begin, std::size_t end)
: lock_id(mtx.get().lock(begin, end))
: lock_id(mtx.lock(begin, end))
, mutex_ref(mtx)
{
}
Expand Down Expand Up @@ -63,12 +63,12 @@ namespace hpx::synchronization {
template <typename RangeMutex>
class range_unique_lock
{
std::reference_wrapper<RangeMutex> mutex_ref;
std::size_t lock_id;
std::reference_wrapper<RangeMutex> mutex_ref;

public:
range_unique_lock(RangeMutex& mtx, std::size_t begin, std::size_t end)
: lock_id(mtx.get().lock(begin, end))
: lock_id(mtx.lock(begin, end))
, mutex_ref(mtx)
{
}
Expand Down

0 comments on commit d927e99

Please sign in to comment.