Skip to content

Commit

Permalink
QgsGeometry to datastream -> avoid extra data copy
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 23, 2015
1 parent 996de71 commit c1b512f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/geometry/qgsgeometry.cpp
Expand Up @@ -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.