diff options
Diffstat (limited to 'lang/cpp/src/engineinfo.h')
-rw-r--r-- | lang/cpp/src/engineinfo.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/lang/cpp/src/engineinfo.h b/lang/cpp/src/engineinfo.h index aa6fcca..cd1b7a7 100644 --- a/lang/cpp/src/engineinfo.h +++ b/lang/cpp/src/engineinfo.h @@ -1,6 +1,8 @@ /* engineinfo.h Copyright (C) 2004 Klarälvdalens Datakonsult AB + 2016 Bundesamt für Sicherheit in der Informationstechnik + Software engineering by Intevation GmbH This file is part of GPGME++. @@ -69,13 +71,13 @@ public: bool operator < (const Version& other) { - if (major < other.major) - return true; - if (minor < other.minor) - return true; - if (patch < other.patch) - return true; - return false; + if (major > other.major || + (major == other.major && minor > other.minor) || + (major == other.major && minor == other.minor && patch > other.patch) || + (major >= other.major && minor >= other.minor && patch >= other.patch)) { + return false; + } + return true; } bool operator < (const char* other) @@ -83,6 +85,15 @@ public: return operator<(Version(other)); } + bool operator > (const char* other) + { + return !operator<(Version(other)); + } + + bool operator > (const Version & other) + { + return !operator<(other); + } bool operator == (const Version& other) { return major == other.major |