diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-09 13:59:09 -0400 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:21 -0400 |
commit | 75059c46d645e42e8da31fb97d003047c67b004b (patch) | |
tree | 75cec577b1cd996e2dde848c0426938286dff201 /src | |
parent | db46f8a70c853ccab3318abed1416231a3c426db (diff) |
thread_worker: Fix compile time error
state is unused in the branch where with_state is false
Diffstat (limited to 'src')
-rw-r--r-- | src/common/thread_worker.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/thread_worker.h b/src/common/thread_worker.h index 8272985ff0..0a975a869d 100644 --- a/src/common/thread_worker.h +++ b/src/common/thread_worker.h @@ -39,7 +39,7 @@ public: const auto lambda = [this, func](std::stop_token stop_token) { Common::SetCurrentThreadName(thread_name.c_str()); { - std::conditional_t<with_state, StateType, int> state{func()}; + [[maybe_unused]] std::conditional_t<with_state, StateType, int> state{func()}; while (!stop_token.stop_requested()) { Task task; { |