Skip to content

Commit

Permalink
Fix StructPublisher move constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Dec 26, 2023
1 parent 89f0c61 commit 9e1d6ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ class StructArrayPublisher : public Publisher {
StructArrayPublisher(StructArrayPublisher&& rhs)
: Publisher{std::move(rhs)},
m_buf{std::move(rhs.m_buf)},
m_schemaPublished{rhs.m_schemaPublished},
m_schemaPublished{
rhs.m_schemaPublished.load(std::memory_order_relaxed)},
m_info{std::move(rhs.m_info)} {}

StructArrayPublisher& operator=(StructArrayPublisher&& rhs) {
Expand Down
3 changes: 2 additions & 1 deletion ntcore/src/main/native/include/networktables/StructTopic.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ class StructPublisher : public Publisher {

StructPublisher(StructPublisher&& rhs)
: Publisher{std::move(rhs)},
m_schemaPublished{rhs.m_schemaPublished},
m_schemaPublished{
rhs.m_schemaPublished.load(std::memory_order_relaxed)},
m_info{std::move(rhs.m_info)} {}

StructPublisher& operator=(StructPublisher&& rhs) {
Expand Down

0 comments on commit 9e1d6ac

Please sign in to comment.