Skip to content

Commit

Permalink
Revert expression TVL as boolean to int
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 19, 2017
1 parent b2cd626 commit 171222b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/expression/qgsexpressionutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ class QgsExpressionUtils

static constexpr TVL NOT[3] = { True, False, Unknown };

#define TVL_True QVariant( 1 )
#define TVL_False QVariant( 0 )
#define TVL_Unknown QVariant()

static QVariant tvl2variant( TVL v )
{
switch ( v )
{
case False:
return 0;
return TVL_False;
case True:
return 1;
return TVL_True;
case Unknown:
default:
return QVariant();
return TVL_Unknown;
}
}

#define TVL_True QVariant( true )
#define TVL_False QVariant( false )
#define TVL_Unknown QVariant( QVariant::Int )

// this handles also NULL values
static TVL getTVLValue( const QVariant &value, QgsExpression *parent )
{
Expand Down

0 comments on commit 171222b

Please sign in to comment.