Skip to content

Commit

Permalink
fix build when compiling with Werror (#158)
Browse files Browse the repository at this point in the history
Compilation was failing on clang16 when compiling with Werror,
specifically Wreorder-ctor, this makes sense because of initilization
rules in C++, where the order of intialization matters.
  • Loading branch information
hashem78 authored Apr 18, 2024
1 parent 406d585 commit 33c4da9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/timers/timer_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ namespace concurrencpp::details {
timer_queue::timer_queue(milliseconds max_waiting_time,
const std::function<void(std::string_view thread_name)>& thread_started_callback,
const std::function<void(std::string_view thread_name)>& thread_terminated_callback) :
m_atomic_abort(false), m_abort(false), m_idle(true),
m_max_waiting_time(max_waiting_time),
m_thread_started_callback(thread_started_callback),
m_thread_terminated_callback(thread_terminated_callback), m_atomic_abort(false), m_abort(false), m_idle(true),
m_max_waiting_time(max_waiting_time) {}
m_thread_terminated_callback(thread_terminated_callback) {}

timer_queue::~timer_queue() noexcept {
shutdown();
Expand Down

0 comments on commit 33c4da9

Please sign in to comment.