Add additional <= and >= comparison operators

This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION
equivalents to use the combined <= and >= functionality.
This commit is contained in:
Chuck Atkins
2016-08-05 14:11:46 -04:00
committed by Brad King
parent 93b705a396
commit 02d177c9cc
18 changed files with 703 additions and 89 deletions

View File

@@ -284,9 +284,11 @@ public:
enum CompareOp
{
OP_LESS,
OP_GREATER,
OP_EQUAL
OP_EQUAL = 1,
OP_LESS = 2,
OP_GREATER = 4,
OP_LESS_EQUAL = OP_LESS | OP_EQUAL,
OP_GREATER_EQUAL = OP_GREATER | OP_EQUAL
};
/**
@@ -297,6 +299,8 @@ public:
std::string const& rhs);
static bool VersionCompareGreater(std::string const& lhs,
std::string const& rhs);
static bool VersionCompareGreaterEq(std::string const& lhs,
std::string const& rhs);
/**
* Determine the file type based on the extension