Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
QgsWkbTypes::to25D(): add explicit casts to avoid cppcheck warning ab…
…out int overflow
  • Loading branch information
rouault committed Jun 1, 2020
1 parent baca6c0 commit 46d3c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgswkbtypes.h
Expand Up @@ -1221,7 +1221,7 @@ class CORE_EXPORT QgsWkbTypes
QgsWkbTypes::Type flat = flatType( type );

if ( flat >= Point && flat <= MultiPolygon )
return static_cast< QgsWkbTypes::Type >( flat + 0x80000000 );
return static_cast< QgsWkbTypes::Type >( static_cast<unsigned>( flat ) + 0x80000000U );
else if ( type == QgsWkbTypes::NoGeometry )
return QgsWkbTypes::NoGeometry;
else
Expand Down

0 comments on commit 46d3c44

Please sign in to comment.