[Liblas-commits] hg: Boost Thread required too

liblas-commits at liblas.org liblas-commits at liblas.org
Wed May 18 15:19:45 EDT 2011


details:   http://hg.liblas.orghg/rev/d08d06128c73
changeset: 2946:d08d06128c73
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed May 18 14:14:10 2011 -0500
description:
Boost Thread required too
Subject: hg: merge

details:   http://hg.liblas.orghg/rev/a8296ae20249
changeset: 2947:a8296ae20249
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed May 18 14:19:37 2011 -0500
description:
merge

diffstat:

 doc/compilation.txt                         |  2 +-
 include/liblas/detail/index/indexoutput.hpp |  8 ++++----
 src/detail/index/indexoutput.cpp            |  2 +-
 src/detail/zippoint.cpp                     |  2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diffs (75 lines):

diff -r 756213b4604a -r a8296ae20249 doc/compilation.txt
--- a/doc/compilation.txt	Thu May 12 14:01:23 2011 -0700
+++ b/doc/compilation.txt	Wed May 18 14:19:37 2011 -0500
@@ -72,7 +72,7 @@
 
     If you are building on Windows, http://www.boostpro.com/download/ has an
     excellent installer. The boost installer defaults are not enough, however,
-    and you will need to scroll down and select "Boost ProgramOptions" and
+    and you will need to scroll down and select "Boost ProgramOptions", "Boost Thread", and
     "Boost Serialization" components, and select static + multithreaded as the
     types. If you want to link in a different way, you will have to change
     your CMake cache variables ``Boost_USE_STATIC_LIBS`` and ``Boost_USE_MULTITHREADED`` 
diff -r 756213b4604a -r a8296ae20249 include/liblas/detail/index/indexoutput.hpp
--- a/include/liblas/detail/index/indexoutput.hpp	Thu May 12 14:01:23 2011 -0700
+++ b/include/liblas/detail/index/indexoutput.hpp	Wed May 18 14:19:37 2011 -0500
@@ -77,7 +77,7 @@
     LIBLAS_SWAP_BYTES_N(src, sizeof(T));
     // error if writing past array end
     if (static_cast<size_t>(pos) + sizeof(T) > dest.size())
-        throw std::out_of_range("liblas::detail::WriteVLRData_n: array index out of range");
+        dest.resize(dest.size() + (std::numeric_limits<unsigned short>::max)());
     // copy sizeof(T) bytes to destination
     memcpy(&dest[pos], &src, sizeof(T));
     // increment the write position to end of written data
@@ -91,7 +91,7 @@
     LIBLAS_SWAP_BYTES_N(src, sizeof(T));
     // error if writing past array end
     if (static_cast<size_t>(pos) + sizeof(T) > dest.size())
-        throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_n: array index out of range");
+        dest.resize(dest.size() + (std::numeric_limits<unsigned short>::max)());
     // copy sizeof(T) bytes to destination
     memcpy(&dest[pos], &src, sizeof(T));
 }
@@ -103,7 +103,7 @@
     std::memcpy(&dest[pos], src, srclen);
     // error if writing past array end
     if (static_cast<size_t>(pos) + static_cast<size_t>(srclen) > dest.size())
-        throw std::out_of_range("liblas::detail::WriteVLRData_str: array index out of range");
+        dest.resize(dest.size() + (std::numeric_limits<unsigned short>::max)());
     // increment the write position to end of written data
     pos += srclen;
 }
@@ -113,7 +113,7 @@
 {
     // error if writing past array end
     if (static_cast<size_t>(pos) + static_cast<size_t>(srclen) > dest.size())
-        throw std::out_of_range("liblas::detail::WriteVLRDataNoInc_str: array index out of range");
+        dest.resize(dest.size() + (std::numeric_limits<unsigned short>::max)());
     // copy srclen bytes to destination
     memcpy(&dest[pos], src, srclen);
 }
diff -r 756213b4604a -r a8296ae20249 src/detail/index/indexoutput.cpp
--- a/src/detail/index/indexoutput.cpp	Thu May 12 14:01:23 2011 -0700
+++ b/src/detail/index/indexoutput.cpp	Wed May 18 14:19:37 2011 -0500
@@ -295,7 +295,7 @@
 				boost::uint32_t WritePos = m_DataRecordSize;
 				// m_TempWritePos is the size of the new data block
 				// m_DataRecordSize is amount of common data written already
-				boost::uint32_t UnwrittenBytes = m_TempWritePos + m_DataRecordSize;
+				boost::uint32_t UnwrittenBytes = m_TempWritePos;
 				// Make DataRecordSize equal to the total size of the data + common data 
 				m_DataRecordSize += m_TempWritePos;
 				// write the total size in the common data section
diff -r 756213b4604a -r a8296ae20249 src/detail/zippoint.cpp
--- a/src/detail/zippoint.cpp	Thu May 12 14:01:23 2011 -0700
+++ b/src/detail/zippoint.cpp	Wed May 18 14:19:37 2011 -0500
@@ -127,7 +127,7 @@
         m_num_items = 2;
         m_items = new LASitem[2];
         m_items[0].type = LASitem::POINT10;
-        m_items[0].size = 8;
+        m_items[0].size = 20;
         m_items[1].type = LASitem::GPSTIME11;
         m_items[1].size = 8;
         break;


More information about the Liblas-commits mailing list