[Liblas-commits] hg-main-tree: that never would have worked (PointBuffer::operator=)

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Mar 23 12:32:52 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/7914d91fd2e6
changeset: 405:7914d91fd2e6
user:      Howard Butler <hobu.inc at gmail.com>
date:      Wed Mar 23 11:32:45 2011 -0500
description:
that never would have worked (PointBuffer::operator=)

diffstat:

 src/PointBuffer.cpp |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r e77f25ec440b -r 7914d91fd2e6 src/PointBuffer.cpp
--- a/src/PointBuffer.cpp	Wed Mar 23 11:29:23 2011 -0500
+++ b/src/PointBuffer.cpp	Wed Mar 23 11:32:45 2011 -0500
@@ -81,7 +81,8 @@
         m_numPoints = rhs.getNumPoints();
         m_capacity = rhs.getCapacity();
         m_bounds = rhs.getSpatialBounds();
-        boost::scoped_array<boost::uint8_t> m_data( new boost::uint8_t[ m_pointSize*m_capacity ] );
+        boost::scoped_array<boost::uint8_t> data( new boost::uint8_t[ m_pointSize*m_capacity ] );
+        m_data.swap(data);
         
         if (rhs.m_data.get())
             memcpy(m_data.get(), rhs.m_data.get(), m_pointSize*m_capacity);


More information about the Liblas-commits mailing list