aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/bbox.cc
diff options
context:
space:
mode:
authorschnetter <>2004-02-27 14:40:00 +0000
committerschnetter <>2004-02-27 14:40:00 +0000
commitfd8dc694896b5b21fb18d792a76c61ed25bdb48c (patch)
treec8e1bbed8b4be2a9e5b6cdc6a5c43138ee82c7b3 /Carpet/CarpetLib/src/bbox.cc
parent2f4515eb5a3009f2bb7ff410e3808ad846f1f76d (diff)
Use new bbox iterators in all places (missed some before).
darcs-hash:20040227144040-07bb3-a89704193701abcae95b27068427adc63cbc76b3.gz
Diffstat (limited to 'Carpet/CarpetLib/src/bbox.cc')
-rw-r--r--Carpet/CarpetLib/src/bbox.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index c1af312a8..e6123db5a 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.20 2004/02/18 15:10:01 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.21 2004/02/27 15:40:40 schnetter Exp $
#include <assert.h>
@@ -182,7 +182,7 @@ bbox<T,D> bbox<T,D>::expanded_containing (const bbox& b) const {
template<class T, int D>
bbox<T,D>::iterator::iterator (const bbox& box, const vect<T,D>& pos)
: box(box), pos(pos) {
- if (box.empty()) this->pos=box.upper()+box.stride();
+ if (box.empty()) this->pos=box.upper();
}
template<class T, int D>
@@ -197,7 +197,6 @@ typename bbox<T,D>::iterator& bbox<T,D>::iterator::operator++ () {
if (pos[d]<=box.upper()[d]) return *this;
pos[d]=box.lower()[d];
}
- pos=box.end().pos;
return *this;
}
@@ -208,13 +207,13 @@ typename bbox<T,D>::iterator bbox<T,D>::begin () const {
template<class T, int D>
typename bbox<T,D>::iterator bbox<T,D>::end () const {
- return iterator(*this, upper()+stride());
+ return iterator(*this, upper());
}
template<class T, int D>
bbox<T,D>::iteratorT::iteratorT (const bbox& box, const vect<T,D>& pos)
: box(box), pos(pos) {
- if (box.empty()) this->pos=box.upper()+box.stride();
+ if (box.empty()) this->pos=box.upper();
}
template<class T, int D>