Skip to content

Commit

Permalink
QgsVariantDelegate::type(): make it obvious to cppcheck that we don't…
Browse files Browse the repository at this point in the history
… care about the return value of str.toInt()/toDouble()
  • Loading branch information
rouault committed May 29, 2020
1 parent 7278e74 commit 0b2b78a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsvariantdelegate.cpp
Expand Up @@ -361,12 +361,12 @@ QVariant::Type QgsVariantDelegate::type( const QVariant &value )

// is this an int?
// perhaps we should treat as double for more flexibility
str.toInt( &ok );
( void ) str.toInt( &ok );
if ( ok )
return QVariant::Int;

// is this a double?
str.toDouble( &ok );
( void ) str.toDouble( &ok );
if ( ok )
return QVariant::Double;

Expand Down

0 comments on commit 0b2b78a

Please sign in to comment.