aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-08-08 15:24:46 -0400
committerErik Schnetter <schnetter@gmail.com>2013-08-08 15:24:46 -0400
commitdf54e9dc11a342b66921cdd66d77ebaf8b961172 (patch)
tree113b31b44de55128f42d0aecfc4e38c579956c02
parent9d85fef489365db1e205e906c80507854540ad06 (diff)
LoopControl: Avoid non-standard C++ feature
-rw-r--r--Carpet/LoopControl/src/loopcontrol.cc3
1 files changed, 1 insertions, 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<typename T>
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);