Skip to content

Commit

Permalink
thread_id_pool.h: mark variable as [[maybe_unused]] (#69)
Browse files Browse the repository at this point in the history
mark a variable only used in an assert as [[maybe_unused]] so that non
debug builds don't give warnings.
  • Loading branch information
wheatman authored Jan 15, 2024
1 parent f8e38c7 commit c655b8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -------------------------------------------------------------------

cmake_minimum_required(VERSION 3.14)
project(PARLAY VERSION 2.2.3
project(PARLAY VERSION 2.2.4
DESCRIPTION "A collection of parallel algorithms and other support for parallelism in C++"
LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion include/parlay/internal/thread_id_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ThreadIdPool : public std::enable_shared_from_this<ThreadIdPool> {


~ThreadIdPool() noexcept {
size_t num_destroyed = 0;
[[maybe_unused]] size_t num_destroyed = 0;
for (auto current = available_ids.load(std::memory_order_relaxed); current; num_destroyed++) {
auto old = std::exchange(current, current->next);
delete old;
Expand Down

0 comments on commit c655b8f

Please sign in to comment.