diff --git a/geom/geom/inc/TGeoPgon.h b/geom/geom/inc/TGeoPgon.h index 7c26d63aa9250..853fba11091c0 100644 --- a/geom/geom/inc/TGeoPgon.h +++ b/geom/geom/inc/TGeoPgon.h @@ -39,7 +39,7 @@ class TGeoPgon : public TGeoPcon { { thread_local std::vector tdata; if (tdata.size() <= fIndex) - tdata.resize(std::max(fgInstanceCount.load(std::memory_order_relaxed), fIndex + 1)); + tdata.resize(fIndex + 1); ThreadData_t &td = tdata[fIndex]; if (td.fInitGen != fGeneration.load(std::memory_order_acquire)) InitThreadSlot(td); diff --git a/geom/geom/inc/TGeoXtru.h b/geom/geom/inc/TGeoXtru.h index eb2e21412d3a3..3e1c59c2b6a7f 100644 --- a/geom/geom/inc/TGeoXtru.h +++ b/geom/geom/inc/TGeoXtru.h @@ -45,7 +45,7 @@ class TGeoXtru : public TGeoBBox { { thread_local std::vector tdata; if (tdata.size() <= fIndex) - tdata.resize(std::max(fgInstanceCount.load(std::memory_order_relaxed), fIndex + 1)); + tdata.resize(fIndex + 1); ThreadData_t &td = tdata[fIndex]; if (td.fInitGen != fGeneration.load(std::memory_order_acquire)) InitThreadSlot(td);