[Liblas-commits] hg: eliminate a function call into FilterPoint if
we don't have ...
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Dec 21 09:40:35 EST 2010
changeset f7e0d60d2e06 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f7e0d60d2e06
summary: eliminate a function call into FilterPoint if we don't have any filters
diffstat:
src/detail/reader/reader.cpp | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diffs (43 lines):
diff -r c62608463853 -r f7e0d60d2e06 src/detail/reader/reader.cpp
--- a/src/detail/reader/reader.cpp Tue Dec 21 08:27:22 2010 -0600
+++ b/src/detail/reader/reader.cpp Tue Dec 21 08:40:29 2010 -0600
@@ -170,25 +170,30 @@
// one to keep or throw an exception.
bool bLastPoint = false;
- if (!FilterPoint(*m_point))
+
+ if (!m_filters.empty())
{
-
- detail::read_n(m_point->GetData().front(), m_ifs, m_record_size);
- ++m_current;
-
- while (!FilterPoint(*m_point))
+ if (!FilterPoint(*m_point))
{
detail::read_n(m_point->GetData().front(), m_ifs, m_record_size);
++m_current;
- if (m_current == m_size)
+
+ while (!FilterPoint(*m_point))
{
- bLastPoint = true;
- break;
+
+ detail::read_n(m_point->GetData().front(), m_ifs, m_record_size);
+ ++m_current;
+ if (m_current == m_size)
+ {
+ bLastPoint = true;
+ break;
+ }
}
}
}
+
if (!m_transforms.empty())
{
TransformPoint(*m_point);
More information about the Liblas-commits
mailing list