From 63f8062313404439d1fc84eaa80c182888825a0e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 7 Nov 2023 22:59:18 +0100 Subject: [PATCH] Make sure that the ID of a semaphore does not change over time --- src/kernel/activity/SemaphoreImpl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/activity/SemaphoreImpl.hpp b/src/kernel/activity/SemaphoreImpl.hpp index ebb439ba49..e7b21d2b0c 100644 --- a/src/kernel/activity/SemaphoreImpl.hpp +++ b/src/kernel/activity/SemaphoreImpl.hpp @@ -49,7 +49,7 @@ class XBT_PUBLIC SemaphoreImpl { std::deque ongoing_acquisitions_; static unsigned next_id_; - unsigned id_ = next_id_++; + const unsigned id_ = next_id_++; friend SemAcquisitionImpl; friend actor::SemaphoreObserver; -- 2.20.1