aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetSlab
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-03-08 00:50:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-03-08 00:50:00 +0000
commit652a3bc85105312587f6acb05380ef9f1d49dae0 (patch)
treed95e347a64ec2164d58870927326bafc7fe70202 /Carpet/CarpetSlab
parent07e242d6ab7281d6a021bd226ed4c0f12dbe9522 (diff)
CarpetSlab: Use numeric_limits<int>::max() instead of INT_MAX
darcs-hash:20070308005038-dae7b-0188a2df680cbf144eab0400d8f3bc81df5ab2e2.gz
Diffstat (limited to 'Carpet/CarpetSlab')
-rw-r--r--Carpet/CarpetSlab/src/slab.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/Carpet/CarpetSlab/src/slab.cc b/Carpet/CarpetSlab/src/slab.cc
index 42fba1403..7bb364033 100644
--- a/Carpet/CarpetSlab/src/slab.cc
+++ b/Carpet/CarpetSlab/src/slab.cc
@@ -3,6 +3,7 @@
#include <string.h>
#include <algorithm>
+#include <limits>
#include <vector>
#include "cctk.h"
@@ -152,7 +153,7 @@ namespace CarpetSlab {
// Sanity check
// (if this fails, someone requested an insane number of grid points)
{
- int max = INT_MAX;
+ int max = numeric_limits<int>::max();
for (int dd=0; dd<hdim; ++dd) {
assert (length[dd] >= 0 && length[dd] <= max);
if (length[dd] > 0) max /= length[dd];