Skip to content
Permalink
Browse files

QgsGeometry to datastream -> avoid extra data copy

  • Loading branch information
m-kuhn committed Dec 23, 2015
1 parent 996de71 commit c1b512f948028093e481e1db089db8c044e86f4c
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/core/geometry/qgsgeometry.cpp
@@ -2292,8 +2292,6 @@ QDataStream& operator>>( QDataStream& in, QgsGeometry& geometry )
return in;
}

char *data = new char[byteArray.size()];
memcpy( data, byteArray.data(), byteArray.size() );
geometry.fromWkb( reinterpret_cast< unsigned char* >( data ), byteArray.size() );
geometry.fromWkb( reinterpret_cast<unsigned char*>( byteArray.data() ), byteArray.size() );
return in;
}

0 comments on commit c1b512f

Please sign in to comment.
You can’t perform that action at this time.