[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Oct 7 11:55:30 EDT 2010


changeset 47129cabb288 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=47129cabb288
summary: we can't write the pad bytes if we have less than 2 bytes between the end of the VLR block and the end of the header -- not *only* 2 bytes

changeset dbbfd9a96a6c in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=dbbfd9a96a6c
summary: remove extraneous throw_out_of_range, we weren't using it

diffstat:

 include/liblas/laspoint.hpp  |  3 +--
 src/detail/writer/header.cpp |  2 +-
 src/laspoint.cpp             |  6 ------
 3 files changed, 2 insertions(+), 9 deletions(-)

diffs (48 lines):

diff -r cf94fbdf37e6 -r dbbfd9a96a6c include/liblas/laspoint.hpp
--- a/include/liblas/laspoint.hpp	Wed Oct 06 13:47:11 2010 -0500
+++ b/include/liblas/laspoint.hpp	Thu Oct 07 10:55:19 2010 -0500
@@ -216,7 +216,6 @@
     HeaderPtr m_header;
     Header const& m_default_header;
 
-    void throw_out_of_range() const;
 };
 
 /// Equal-to operator implemented in terms of Point::equal method.
@@ -241,7 +240,7 @@
     if (index == 2)
         return GetZ();
 
-    throw_out_of_range();
+    throw std::out_of_range("coordinate subscript out of range");
     
 }
 
diff -r cf94fbdf37e6 -r dbbfd9a96a6c src/detail/writer/header.cpp
--- a/src/detail/writer/header.cpp	Wed Oct 06 13:47:11 2010 -0500
+++ b/src/detail/writer/header.cpp	Thu Oct 07 10:55:19 2010 -0500
@@ -358,7 +358,7 @@
 
     int32_t diff = m_header.GetDataOffset() - GetRequiredHeaderSize();
 
-    if (diff != 2) {
+    if (diff < 2) {
         std::ostringstream oss;
         oss << "Header is not large enough to write extra 1.0 pad bytes.  Data offset is ";
         oss << m_header.GetDataOffset() << " while the required total size ";
diff -r cf94fbdf37e6 -r dbbfd9a96a6c src/laspoint.cpp
--- a/src/laspoint.cpp	Wed Oct 06 13:47:11 2010 -0500
+++ b/src/laspoint.cpp	Thu Oct 07 10:55:19 2010 -0500
@@ -276,12 +276,6 @@
     return os;
 }
 
-void Point::throw_out_of_range() const
-{
-    throw std::out_of_range("coordinate subscript out of range");
-}
-
-
 
 double Point::GetX() const
 {


More information about the Liblas-commits mailing list