diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-09-21 11:48:34 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:10 +0000 |
commit | 939ce036c25774d579b4d5b8776e26ada5637e87 (patch) | |
tree | 7a7ca040b3f22eee16d27e89d42f8659c370cad8 /Carpet/CarpetLib/src/gdata.hh | |
parent | 2e8a0c5ff54c2e223715e18378809f7eef72011e (diff) |
CarpetLib: declare local variable as const
Ignore-this: f1efc776fad3834bdac64279ef8c38c9
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.hh')
-rw-r--r-- | Carpet/CarpetLib/src/gdata.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Carpet/CarpetLib/src/gdata.hh b/Carpet/CarpetLib/src/gdata.hh index 5836f8f4e..a36fbb84c 100644 --- a/Carpet/CarpetLib/src/gdata.hh +++ b/Carpet/CarpetLib/src/gdata.hh @@ -124,7 +124,7 @@ public: assert (_has_storage); return _extent; } - + int elementsize () const { return c_datatype_size(); } @@ -133,8 +133,8 @@ public: int offset (const ivect& index) const { assert (_has_storage); assert (all((index-extent().lower()) % extent().stride() == 0)); - ivect ind = (index-extent().lower()) / extent().stride(); - assert (all(ind>=0 && ind<=shape())); + ivect const ind = (index-extent().lower()) / extent().stride(); + assert (all(ind>=0 and ind<=shape())); return dot(ind, stride()); } |