[Liblas-commits] hg: Removed dead code wrapped with always-false condition.

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Oct 26 16:07:51 EDT 2010


changeset 368181fe207c in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=368181fe207c
summary: Removed dead code wrapped with always-false condition.

diffstat:

 src/detail/writer/point.cpp |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (19 lines):

diff -r db448f962223 -r 368181fe207c src/detail/writer/point.cpp
--- a/src/detail/writer/point.cpp	Tue Oct 26 14:37:53 2010 -0500
+++ b/src/detail/writer/point.cpp	Tue Oct 26 21:07:21 2010 +0100
@@ -77,12 +77,9 @@
     // that we can write into the file as necessary.  We make it 
     // here instead of at each ::write() invocation to save the 
     // allocation and writing of the array
-    if (m_format.GetByteSize() != m_format.GetBaseByteSize()) {
-        std::size_t size = m_format.GetByteSize() - m_format.GetBaseByteSize();
-        
-        if (size < 0) {
-            throw std::runtime_error("ByteSize of format was less than BaseByteSize, this cannot happen!");
-        }
+    if (m_format.GetByteSize() != m_format.GetBaseByteSize())
+	{
+        std::size_t const size = m_format.GetByteSize() - m_format.GetBaseByteSize();
         
         m_blanks.resize(size);
         m_blanks.assign(size, 0);


More information about the Liblas-commits mailing list