X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/661698e54f2bc599dc1a961ffbae08ccdd6b9b97..8778519200cc317e3ecac677f10298caa7d1729a:/include/wx/xrc/xmlres.h?ds=sidebyside diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 23cbea1c51..035ba9c711 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -261,8 +261,16 @@ public: // Compares resources version to argument. Returns -1 if resources version // is less than the argument, +1 if greater and 0 if they equal. int CompareVersion(int major, int minor, int release, int revision) const - { return GetVersion() - - (major*256*256*256 + minor*256*256 + release*256 + revision); } + { + long diff = GetVersion() - + (major*256*256*256 + minor*256*256 + release*256 + revision); + if ( diff < 0 ) + return -1; + else if ( diff > 0 ) + return +1; + else + return 0; + } //// Singleton accessors.