Skip to content

Commit

Permalink
Fix task composer data storage constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 25, 2024
1 parent 602a387 commit e9a6a01
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ TaskComposerDataStorage::TaskComposerDataStorage(const TaskComposerDataStorage&
std::shared_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = other.name_;
data_ = other.data_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
}

Expand All @@ -56,6 +57,7 @@ TaskComposerDataStorage& TaskComposerDataStorage::operator=(const TaskComposerDa
std::shared_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = other.name_;
data_ = other.data_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
return *this;
}
Expand All @@ -67,6 +69,7 @@ TaskComposerDataStorage::TaskComposerDataStorage(TaskComposerDataStorage&& other
std::unique_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = std::move(other.name_);
data_ = std::move(other.data_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
}

Expand All @@ -77,6 +80,7 @@ TaskComposerDataStorage& TaskComposerDataStorage::operator=(TaskComposerDataStor
std::unique_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = std::move(other.name_);
data_ = std::move(other.data_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
return *this;
}
Expand Down

0 comments on commit e9a6a01

Please sign in to comment.