From: Martin Quinson Date: Tue, 7 Nov 2023 21:59:18 +0000 (+0100) Subject: Make sure that the ID of a semaphore does not change over time X-Git-Tag: v3.35~87^2~5 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/63f8062313404439d1fc84eaa80c182888825a0e Make sure that the ID of a semaphore does not change over time --- 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;