Skip to content

Commit

Permalink
QgsGmlSchema::addAttribute(): make it obvious to cppcheck that we don…
Browse files Browse the repository at this point in the history
…'t care about the return value of .toInt()/toDouble()
  • Loading branch information
rouault committed May 29, 2020
1 parent e86517e commit c3cdbe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsgmlschema.cpp
Expand Up @@ -514,15 +514,15 @@ void QgsGmlSchema::addAttribute( const QString &name, const QString &value )
{
// It is not geometry attribute -> analyze value
bool ok;
value.toInt( &ok );
( void ) value.toInt( &ok );
QVariant::Type type = QVariant::String;
if ( ok )
{
type = QVariant::Int;
}
else
{
value.toDouble( &ok );
( void ) value.toDouble( &ok );
if ( ok )
{
type = QVariant::Double;
Expand Down

0 comments on commit c3cdbe6

Please sign in to comment.