Skip to content
Permalink
Browse files

Revert "QgsGeometry to datastream -> avoid extra data copy"

This reverts commit c1b512f.
  • Loading branch information
m-kuhn committed Dec 23, 2015
1 parent c1b512f commit b602c5c58832a642518be7558858cac3c2c8a2ba
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/geometry/qgsgeometry.cpp
@@ -2292,6 +2292,8 @@ QDataStream& operator>>( QDataStream& in, QgsGeometry& geometry )
return in;
}

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

0 comments on commit b602c5c

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