[Liblas-commits] hg: whitespace normalization
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Dec 9 17:17:30 EST 2010
changeset 28fec51dfcd4 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=28fec51dfcd4
summary: whitespace normalization
diffstat:
src/lasreader.cpp | 39 ++-------------------------------------
1 files changed, 2 insertions(+), 37 deletions(-)
diffs (80 lines):
diff -r 281a5b82de9c -r 28fec51dfcd4 src/lasreader.cpp
--- a/src/lasreader.cpp Thu Dec 09 16:14:39 2010 -0600
+++ b/src/lasreader.cpp Thu Dec 09 16:17:11 2010 -0600
@@ -77,10 +77,9 @@
Reader::Reader(std::istream& ifs, uint32_t cache_size, Header const& header) :
m_pimpl(new detail::CachedReaderImpl(ifs,3))
{
- // if we have a custom header, create a slot for it and then copy
- // the header we were given
Init();
+ m_pimpl->SetHeader(header);
}
Reader::Reader(ReaderI* reader) :
@@ -114,7 +113,6 @@
return m_pimpl->GetPoint();
}
-
bool Reader::ReadNextPoint()
{
try
@@ -161,6 +159,7 @@
}
return false;
}
+
Point const& Reader::operator[](std::size_t n)
{
if (m_pimpl->GetHeader().GetPointRecordsCount() <= n)
@@ -175,48 +174,14 @@
throw std::out_of_range("no point record at given position");
}
-
return m_pimpl->GetPoint();
}
void Reader::Init()
{
- // Copy our existing header in case we have already set a custom
- // one. We will use this instead of the one from the stream if
- // the constructor with the header was used.
-
- // Header custom_header;
- // if (m_header != 0)
- // {
- // custom_header = *m_header;
- // }
- //
- // m_pimpl->ReadHeader();
- //
- // m_header = HeaderPtr(new liblas::Header(m_pimpl->GetHeader()));
- //
- // // throw std::runtime_error("public header block reading failure");
- //
- // m_pimpl->Reset(m_header);
- //
- // if (bCustomHeader) {
- // custom_header.SetDataOffset(m_header->GetDataOffset());
- // *m_header = custom_header;
- // }
- //
- // This is yucky, but we need to ensure that we have a reference
- // to a real point existing as soon as we are constructed.
- // This is for someone who tries to GetPoint without first reading
- // a point, and it will ensure they get something valid. We just
- // keep it around until the reader closes down and then deletes.
- //
- // m_point = m_empty_point.get();
-
m_pimpl->ReadHeader();
-
}
-
void Reader::Reset()
{
Init();
More information about the Liblas-commits
mailing list