[Liblas-commits] hg: fix laszip seek issue

liblas-commits at liblas.org liblas-commits at liblas.org
Wed May 11 13:48:29 EDT 2011


details:   http://hg.liblas.orghg/rev/b891385ec5e7
changeset: 2936:b891385ec5e7
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed May 11 10:48:16 2011 -0700
description:
fix laszip seek issue

diffstat:

 src/detail/reader/zipreader.cpp |  10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diffs (31 lines):

diff -r 91e31e884124 -r b891385ec5e7 src/detail/reader/zipreader.cpp
--- a/src/detail/reader/zipreader.cpp	Wed May 11 09:13:06 2011 -0700
+++ b/src/detail/reader/zipreader.cpp	Wed May 11 10:48:16 2011 -0700
@@ -157,6 +157,7 @@
         unsigned int stat = 1;
         try
         {
+            m_ifs.seekg(m_header->GetDataOffset(), std::ios::beg);
             stat = m_unzipper->open(m_ifs, m_zip);
         }
         catch(...)
@@ -332,19 +333,10 @@
         throw std::runtime_error(msg.str());
     } 
 
-    std::streamsize pos = m_header->GetDataOffset();    
-
     m_ifs.clear();
-    m_ifs.seekg(pos, std::ios::beg);
-        
-    int t1 = m_ifs.tellg();
-    int t2 = m_unzipper->tell();
 
     m_unzipper->seek(n);
 
-    int t3 = m_ifs.tellg();
-    int t4 = m_unzipper->tell();
-
     m_current = n;
 }
 


More information about the Liblas-commits mailing list