[Liblas-commits] hg: flip broken logic of verify(), and return false for == if ei...

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Aug 3 11:33:57 EDT 2010


changeset 8278174840f5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=8278174840f5
summary: flip broken logic of verify(), and return false for == if either the min() or max() don't match

diffstat:

 src/lasbounds.cpp |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 87fac12b830a -r 8278174840f5 src/lasbounds.cpp
--- a/src/lasbounds.cpp	Tue Aug 03 09:17:04 2010 -0500
+++ b/src/lasbounds.cpp	Tue Aug 03 10:33:48 2010 -0500
@@ -167,7 +167,7 @@
         if (min(d) > max(d) )
         {
             // Check that we're not infinity either way
-            if (!(detail::compare_distance(min(d), std::numeric_limits<double>::max()) ||
+            if ( (detail::compare_distance(min(d), std::numeric_limits<double>::max()) ||
                   detail::compare_distance(max(d), -std::numeric_limits<double>::max()) ))
             {
                 std::ostringstream msg; 
@@ -184,7 +184,7 @@
     for (Vector::size_type i = 0; i < dimension(); i++) {
         
         if    (!(detail::compare_distance(min(i), other.min(i)))  
-            && !(detail::compare_distance(max(i), other.max(i)))) 
+            || !(detail::compare_distance(max(i), other.max(i)))) 
         {
             return false;
         }


More information about the Liblas-commits mailing list