Trivial optimization. Wonder if compiler was smart enough about it.
authorunc0rr
Wed, 17 Apr 2013 12:11:33 +0400
changeset 8915 36e1574e989d
parent 8914 54eb3f358740
child 8916 71485c03a507
Trivial optimization. Wonder if compiler was smart enough about it.
hedgewars/uFloat.pas
--- a/hedgewars/uFloat.pas	Mon Apr 15 22:26:30 2013 +0200
+++ b/hedgewars/uFloat.pas	Wed Apr 17 12:11:33 2013 +0400
@@ -278,7 +278,7 @@
     if z1.QWordValue = z2.QWordValue then
         b:= false
     else
-        b:= not((z1.QWordValue = z2.QWordValue) or ((z2.QWordValue < z1.QWordValue) <> z1.isNegative))
+        b:= (z2.QWordValue < z1.QWordValue) = z1.isNegative
 end;
 
 operator > (const z1, z2: hwFloat) b : boolean; inline;