diff --git a/src/dialog_version_check.cpp b/src/dialog_version_check.cpp index 349fc0520..f914470dd 100644 --- a/src/dialog_version_check.cpp +++ b/src/dialog_version_check.cpp @@ -101,18 +101,16 @@ AegisubUpdateDescription ParseVersionString(std::string version_string) { bool IsNewer(AegisubUpdateDescription update) { AegisubUpdateDescription current = ParseVersionString(GetReleaseVersion()); - if (update.major > current.major) - return true; - else if (update.major == current.major) - if (update.minor > current.minor) - return true; - else if (update.minor == current.minor) - if (update.patch > current.patch) - return true; - else - return update.extra.compare(current.extra) > 0; + if (update.major != current.major) + return update.major > current.major; - return false; + if (update.minor != current.minor) + return update.minor > current.minor; + + if (update.patch != current.patch) + return update.patch > current.patch; + + return update.extra.compare(current.extra) > 0; } std::string AegisubVersion(AegisubUpdateDescription update) {