[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd/internal image_ref_implementation.hh
From: |
Gerhard Reitmayr |
Subject: |
[libcvd-members] libcvd/cvd/internal image_ref_implementation.hh |
Date: |
Mon, 23 Apr 2007 15:44:05 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Gerhard Reitmayr <gerhard> 07/04/23 15:44:05
Modified files:
cvd/internal : image_ref_implementation.hh
Log message:
make ImageRef::next, prev work for min >= max
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/internal/image_ref_implementation.hh?cvsroot=libcvd&r1=1.12&r2=1.13
Patches:
Index: image_ref_implementation.hh
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/internal/image_ref_implementation.hh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- image_ref_implementation.hh 13 Feb 2007 18:28:50 -0000 1.12
+++ image_ref_implementation.hh 23 Apr 2007 15:44:05 -0000 1.13
@@ -42,22 +42,22 @@
inline bool ImageRef::next(const ImageRef& max) // move on to the next
value
{
- return(++x != max.x || (x=0, ++y != max.y) || (y=0, false));
+ return(++x < max.x || (x=0, ++y < max.y) || (y=0, false));
}
inline bool ImageRef::next(const ImageRef& min, const ImageRef& max)
{
- return (++x != max.x || (x=min.x, ++y != max.y) || (y=min.y, false));
+ return (++x < max.x || (x=min.x, ++y < max.y) || (y=min.y, false));
}
inline bool ImageRef::prev(const ImageRef& max) // move back to the
previous value
{
- return(--x != -1 || (x=max.x-1, --y != -1) || (y=max.y-1, false));
+ return(--x > -1 || (x=max.x-1, --y > -1) || (y=max.y-1, false));
}
inline bool ImageRef::prev(const ImageRef& min, const ImageRef& max)
{
- return (--x != min.x-1 || (x=max.x-1, --y != min.y-1) || (y=max.y-1,
false));
+ return (--x > min.x-1 || (x=max.x-1, --y > min.y-1) || (y=max.y-1,
false));
}
inline void ImageRef::home()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/cvd/internal image_ref_implementation.hh,
Gerhard Reitmayr <=