aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gf.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-02-03 20:58:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-02-03 20:58:00 +0000
commit2b82da0e695a422775b0850f5f14e56f80f41cfa (patch)
treeb8c54c45e56c84c5488288b4e531335e8b696bc4 /Carpet/CarpetLib/src/gf.cc
parent3046f9acd4a16df5450f45b2e43e1395bed42ad1 (diff)
CarpetLib: Use AT to index std::vector
Define a macro AT() to index into std::vector. Depending on the macro NDEBUG, AT() is defined either as at(), providing index checking, or as operator[], providing no checking. darcs-hash:20070203205854-dae7b-a1999c88c95ba12b1ee66505f712aefdd67d7e6f.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gf.cc')
-rw-r--r--Carpet/CarpetLib/src/gf.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/gf.cc b/Carpet/CarpetLib/src/gf.cc
index 26fa00f38..50bb0f661 100644
--- a/Carpet/CarpetLib/src/gf.cc
+++ b/Carpet/CarpetLib/src/gf.cc
@@ -58,7 +58,7 @@ const data<T>* gf<T>::operator() (int tl, int rl, int c, int ml) const
assert (c>=0 and c<h.components(rl));
assert (ml>=0 and ml<h.mglevels());
assert (tl>=0 and tl<timelevels(ml, rl));
- return (const data<T>*)storage.at(ml).at(rl).at(c).at(tl);
+ return (const data<T>*)storage.AT(ml).AT(rl).AT(c).AT(tl);
}
template<typename T>
@@ -68,7 +68,7 @@ data<T>* gf<T>::operator() (int tl, int rl, int c, int ml)
assert (c>=0 and c<h.components(rl));
assert (ml>=0 and ml<h.mglevels());
assert (tl>=0 and tl<timelevels(ml, rl));
- return (data<T>*)storage.at(ml).at(rl).at(c).at(tl);
+ return (data<T>*)storage.AT(ml).AT(rl).AT(c).AT(tl);
}