Skip to content
Permalink
Browse files
Fix Windows build
  • Loading branch information
NathanW2 committed May 22, 2017
1 parent 1577a57 commit 3cd714affe49f968af2e67e3ba84b1acbfc34ef4
Showing with 18 additions and 17 deletions.
  1. +15 −3 src/core/expression/qgsexpressionutils.cpp
  2. +3 −14 src/core/expression/qgsexpressionutils.h
@@ -16,6 +16,18 @@
#include "qgsexpressionutils.h"
#include "qgsexpressionnode.h"

constexpr QgsExpressionUtils::TVL QgsExpressionUtils::AND[3][3];
constexpr QgsExpressionUtils::TVL QgsExpressionUtils::OR[3][3];
constexpr QgsExpressionUtils::TVL QgsExpressionUtils::NOT[3];
QgsExpressionUtils::TVL QgsExpressionUtils::AND[3][3] =
{
// false true unknown
{ False, False, False }, // false
{ False, True, Unknown }, // true
{ False, Unknown, Unknown } // unknown
};
QgsExpressionUtils::TVL QgsExpressionUtils::OR[3][3] =
{
{ False, True, Unknown }, // false
{ True, True, True }, // true
{ Unknown, True, Unknown } // unknown
};

QgsExpressionUtils::TVL QgsExpressionUtils::NOT[3] = { True, False, Unknown };
@@ -45,22 +45,11 @@ class QgsExpressionUtils
};


static constexpr TVL AND[3][3] =
{
// false true unknown
{ False, False, False }, // false
{ False, True, Unknown }, // true
{ False, Unknown, Unknown } // unknown
};
static TVL AND[3][3];

static constexpr TVL OR[3][3] =
{
{ False, True, Unknown }, // false
{ True, True, True }, // true
{ Unknown, True, Unknown } // unknown
};
static TVL OR[3][3];

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

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

1 comment on commit 3cd714a

@NathanW2

This comment has been minimized.

Copy link
Member Author

@NathanW2 NathanW2 commented on 3cd714a May 22, 2017

@m-kuhn I had to drop constexpr here to make this work but @jef-n might know a better fix.

Please sign in to comment.