Skip to content

Commit

Permalink
clean warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jun 3, 2013
1 parent 1d7aca9 commit 53fa747
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/pdal/filters/HexBin.hpp
Expand Up @@ -107,6 +107,10 @@ class PDAL_DLL IteratorBase
boost::uint32_t m_sample_number;
boost::int32_t m_density;
double m_edge_size;

private:
IteratorBase& operator=(IteratorBase const&);


};

Expand Down
10 changes: 9 additions & 1 deletion src/filters/HexBin.cpp
Expand Up @@ -163,7 +163,15 @@ boost::uint32_t HexBin::readBufferImpl(PointBuffer& buffer)
if (bDoSample)
{
if (getStage().getNumPoints() < m_sample_size)
m_sample_size = getStage().getNumPoints();
{
if (getStage().getNumPoints() >= std::numeric_limits<boost::uint32_t>::max())
{
throw pdal_error("point count >= size of 32bit integer, set a sample size");
}

m_sample_size = static_cast<boost::uint32_t>(getStage().getNumPoints());
}

if ( m_sample_number < m_sample_size )
{
m_samples.push_back(hexer::Point(x,y));
Expand Down

0 comments on commit 53fa747

Please sign in to comment.