From df54e9dc11a342b66921cdd66d77ebaf8b961172 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 8 Aug 2013 15:24:46 -0400 Subject: LoopControl: Avoid non-standard C++ feature --- Carpet/LoopControl/src/loopcontrol.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Carpet/LoopControl/src/loopcontrol.cc b/Carpet/LoopControl/src/loopcontrol.cc index ad2c30b76..26b86a50f 100644 --- a/Carpet/LoopControl/src/loopcontrol.cc +++ b/Carpet/LoopControl/src/loopcontrol.cc @@ -229,7 +229,6 @@ namespace { template class mempool { - const int nobjects = 1000000 / sizeof(T); T* next; int nleft; public: @@ -239,7 +238,7 @@ namespace { void* allocate() { if (nleft < 1) { - nleft = nobjects; + nleft = 1000000 / sizeof(T); next = (T*)new char[nleft * sizeof(T)]; } assert(nleft >= 1); -- cgit v1.2.3