[Liblas-commits] hg: another attempt at consolidating the logic for determining w...

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Jun 21 10:53:20 EDT 2011


details:   http://hg.liblas.orghg/rev/ec9822631819
changeset: 2962:ec9822631819
user:      Howard Butler <hobu.inc at gmail.com>
date:      Tue Jun 21 09:53:14 2011 -0500
description:
another attempt at consolidating the logic for determining whether or not to update the header in the case when the scale/offset has changed #226

diffstat:

 src/point.cpp |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (24 lines):

diff -r 0fa04dd9d461 -r ec9822631819 src/point.cpp
--- a/src/point.cpp	Tue Jun 21 09:49:30 2011 -0500
+++ b/src/point.cpp	Tue Jun 21 09:53:14 2011 -0500
@@ -333,15 +333,11 @@
     
     
     //FIXME: check boost::optional returns
-    if (detail::compare_distance(header->GetScaleX(), m_header_new->GetScaleX()) ||
-        detail::compare_distance(header->GetScaleY(), m_header_new->GetScaleY()) ||
-        detail::compare_distance(header->GetScaleZ(), m_header_new->GetScaleZ()))
-        bSetCoordinates = false;
-    else
-        bSetCoordinates = true;
-    
-    if (detail::compare_distance(header->GetOffsetX(), m_header_new->GetOffsetX()) ||
-        detail::compare_distance(header->GetOffsetY(), m_header_new->GetOffsetY()) ||
+    if (detail::compare_distance(header->GetScaleX(), m_header_new->GetScaleX()) &&
+        detail::compare_distance(header->GetScaleY(), m_header_new->GetScaleY()) &&
+        detail::compare_distance(header->GetScaleZ(), m_header_new->GetScaleZ()) &&
+        detail::compare_distance(header->GetOffsetX(), m_header_new->GetOffsetX()) &&
+        detail::compare_distance(header->GetOffsetY(), m_header_new->GetOffsetY()) &&
         detail::compare_distance(header->GetOffsetZ(), m_header_new->GetOffsetZ()))
         bSetCoordinates = false;
     else


More information about the Liblas-commits mailing list