From 939ce036c25774d579b4d5b8776e26ada5637e87 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 21 Sep 2009 11:48:34 -0500 Subject: CarpetLib: declare local variable as const Ignore-this: f1efc776fad3834bdac64279ef8c38c9 --- Carpet/CarpetLib/src/gdata.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Carpet/CarpetLib/src/gdata.hh') 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()); } -- cgit v1.2.3