mail[Wesnoth-commits] r28738 - /trunk/src/version.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by shadowm2006 on August 19, 2008 - 03:49:
Author: shadowmaster
Date: Tue Aug 19 03:49:30 2008
New Revision: 28738

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28738&view=rev
Log:
* Fixed 1.0.0 versus 1.0.0+anything case.

Modified:
    trunk/src/version.cpp

Modified: trunk/src/version.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/version.cpp?rev=28738&r1=28737&r2=28738&view=diff
==============================================================================
--- trunk/src/version.cpp (original)
+++ trunk/src/version.cpp Tue Aug 19 03:49:30 2008
@@ -254,19 +254,21 @@
 
 bool operator<(const version_info& l, const version_info& r)
 {
-       return version_numbers_comparison_internal(l, r, LT) && (
-              (l.special_version().empty() && r.special_version().empty()) ||
-              (l.special_version().empty() && !r.special_version().empty()) 
||
-              (l.special_version() < r.special_version())
+       return version_numbers_comparison_internal(l, r, LT) ||
+              (l == r && ((l.special_version().empty() && 
r.special_version().empty()) ||
+                          (l.special_version().empty() && 
!r.special_version().empty()) ||
+                          (l.special_version() < r.special_version())
+                         )
               );
 }
 
 bool operator>(const version_info& l, const version_info& r)
 {
-       return version_numbers_comparison_internal(l, r, GT) && (
-              (r.special_version().empty() && l.special_version().empty()) ||
-              (r.special_version().empty() && !l.special_version().empty()) 
||
-              (l.special_version() > r.special_version())
+       return version_numbers_comparison_internal(l, r, GT) ||
+              (l == r && ((r.special_version().empty() && 
l.special_version().empty()) ||
+                          (r.special_version().empty() && 
!l.special_version().empty()) ||
+                          (l.special_version() > r.special_version())
+                         )
               );
 }
 




Related Messages


Powered by MHonArc, Updated Tue Aug 19 04:00:33 2008