Skip to content

Commit

Permalink
construct using T{} instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
theartful committed Dec 23, 2023
1 parent 3c55086 commit c958a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion broadcast_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class storage_block<T, WaitingStrategy,
using waiting_strategy = WaitingStrategy;

public:
storage_block() { m_storage.store({0, 0}, std::memory_order_relaxed); }
storage_block() { m_storage.store({0, T{}}, std::memory_order_relaxed); }

void store(const T &value) {
auto old_storage = m_storage.load(std::memory_order_relaxed);
Expand Down

0 comments on commit c958a1b

Please sign in to comment.