Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 22, 2017
1 parent 1577a57 commit 3cd714a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
18 changes: 15 additions & 3 deletions src/core/expression/qgsexpressionutils.cpp
Expand Up @@ -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 };
17 changes: 3 additions & 14 deletions src/core/expression/qgsexpressionutils.h
Expand Up @@ -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 )
Expand Down

1 comment on commit 3cd714a

@NathanW2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.