aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 19:19:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-02-04 19:19:00 +0000
commit954711d35af929870790714e8edff1edc0e35572 (patch)
tree9400c4b6fe6f38a0954b6addbace69a03dfc448a /Carpet/CarpetLib
parentcd61e4369382b4b923318450a74965188a6502de (diff)
CarpetLib: Add some const qualifiers
darcs-hash:20070204191934-dae7b-8428cc85656d5eb92580f82165ef134c72fc98c9.gz
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/gdata.cc11
-rw-r--r--Carpet/CarpetLib/src/ggf.cc2
2 files changed, 7 insertions, 6 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc
index 7959e0880..268db5971 100644
--- a/Carpet/CarpetLib/src/gdata.cc
+++ b/Carpet/CarpetLib/src/gdata.cc
@@ -316,15 +316,16 @@ void gdata::copy_into_sendbuffer (comm_state& state,
assert (fillstate <= (int)procbuf.sendbufsize * datatypesize);
// copy this processor's data into the send buffer
- const ibbox& ext = src->extent();
- ivect myshape = ext.shape() / ext.stride();
- ivect items = (box.upper() - box.lower()) / box.stride() + 1;
- ivect offs = (box.lower() - ext.lower()) / ext.stride();
+ ibbox const & ext = src->extent();
+ ivect const myshape = ext.shape() / ext.stride();
+ ivect const items = (box.upper() - box.lower()) / box.stride() + 1;
+ ivect const offs = (box.lower() - ext.lower()) / ext.stride();
assert (dim == 3);
for (int k = 0; k < items[2]; k++) {
for (int j = 0; j < items[1]; j++) {
- int i = offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2]));
+ int const i =
+ offs[0] + myshape[0]*((j+offs[1]) + myshape[1]*(k+offs[2]));
memcpy (procbuf.sendbuf,
((const char*) src->storage()) + datatypesize*i,
datatypesize * items[0]);
diff --git a/Carpet/CarpetLib/src/ggf.cc b/Carpet/CarpetLib/src/ggf.cc
index 7009ed0f9..759fb7a63 100644
--- a/Carpet/CarpetLib/src/ggf.cc
+++ b/Carpet/CarpetLib/src/ggf.cc
@@ -277,7 +277,7 @@ void ggf::recompose_sync (comm_state& state, const int rl,
// Cycle the time levels by rotating the data sets
-void ggf::cycle (int rl, int c, int ml) {
+void ggf::cycle (int const rl, int const c, int const ml) {
assert (rl>=0 and rl<h.reflevels());
assert (c>=0 and c<h.components(rl));
assert (ml>=0 and ml<h.mglevels());