Skip to content

Commit

Permalink
::reset actually does reset, even if schema sizes are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 10, 2013
1 parent 69b97e6 commit 1356336
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/PointBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ void PointBuffer::reset(Schema const& new_schema)

m_schema = new_schema;

if (new_size != old_size)
{
boost::scoped_array<boost::uint8_t> data(new boost::uint8_t[ m_schema.getByteSize()*m_capacity ]());
m_data.swap(data);
}
boost::scoped_array<boost::uint8_t> data(new boost::uint8_t[ m_schema.getByteSize()*m_capacity ]());
m_data.swap(data);

m_numPoints = 0;
m_byteSize = new_schema.getByteSize();
}
Expand Down

0 comments on commit 1356336

Please sign in to comment.