[Liblas-commits] hg: fix #207 extra work in files with invalid point counts

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Feb 14 14:10:28 EST 2011


details:   http://hg.liblas.orghg/rev/8ec7e555a05a
changeset: 2856:8ec7e555a05a
user:      Howard Butler <hobu.inc at gmail.com>
date:      Mon Feb 14 13:07:06 2011 -0600
description:
fix #207 extra work in files with invalid point counts
Subject: hg: fix #208 display of header summary in lasinfo

details:   http://hg.liblas.orghg/rev/28e9558c5062
changeset: 2857:28e9558c5062
user:      Howard Butler <hobu.inc at gmail.com>
date:      Mon Feb 14 13:10:19 2011 -0600
description:
fix #208 display of header summary in lasinfo

diffstat:

 apps/lasinfo.cpp             |  2 +-
 src/detail/reader/reader.cpp |  3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r ac359ef58925 -r 28e9558c5062 apps/lasinfo.cpp
--- a/apps/lasinfo.cpp	Mon Feb 14 09:11:00 2011 -0800
+++ b/apps/lasinfo.cpp	Mon Feb 14 13:10:19 2011 -0600
@@ -236,7 +236,7 @@
                             verbose
                             );
 
-        liblas::Header const& header = reader.GetHeader();
+        header = reader.GetHeader();
 
         // Add the header to the summary so we can get more detailed 
         // info
diff -r ac359ef58925 -r 28e9558c5062 src/detail/reader/reader.cpp
--- a/src/detail/reader/reader.cpp	Mon Feb 14 09:11:00 2011 -0800
+++ b/src/detail/reader/reader.cpp	Mon Feb 14 13:10:19 2011 -0600
@@ -172,7 +172,8 @@
     } catch (std::runtime_error&)
     {
         // If the stream is no good anymore, we're done reading points
-        return;
+        throw std::out_of_range("ReadNextPoint: file has no more points to read, end of file reached");
+
     }
 
     // Filter the points and continue reading until we either find 


More information about the Liblas-commits mailing list