[Liblas-commits] hg: add a comparison cast to silence warning

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Jul 1 14:56:32 EDT 2011


details:   http://hg.liblas.orghg/rev/358777fe89bf
changeset: 3065:358777fe89bf
user:      Howard Butler <hobu.inc at gmail.com>
date:      Fri Jul 01 13:56:28 2011 -0500
description:
add a comparison cast to silence warning

diffstat:

 src/detail/writer/header.cpp |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (17 lines):

diff -r 2beedf2e9e48 -r 358777fe89bf src/detail/writer/header.cpp
--- a/src/detail/writer/header.cpp	Fri Jul 01 13:39:11 2011 -0500
+++ b/src/detail/writer/header.cpp	Fri Jul 01 13:56:28 2011 -0500
@@ -171,9 +171,10 @@
         {
             int32_t d = abs(existing_padding);
             
-            // overflowed here
-            boost::int32_t new_padding = d - m_header.GetVLRBlockSize();
-            if (m_header.GetVLRBlockSize() > d)
+            // If our required VLR space is larger than we have 
+            // room for, we have no padding.  AddVLRs will take care 
+            // of incrementing up the space it needs.
+            if (static_cast<boost::int32_t>(m_header.GetVLRBlockSize()) > d)
             {
                 m_header.SetHeaderPadding(0);
             } else {


More information about the Liblas-commits mailing list