Changeset: b949f6115952 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b949f6115952
Modified Files:
        gdk/gdk_atoms.h
Branch: default
Log Message:

Avoid branches in simple_CMP.


diffs (12 lines):

diff --git a/gdk/gdk_atoms.h b/gdk/gdk_atoms.h
--- a/gdk/gdk_atoms.h
+++ b/gdk/gdk_atoms.h
@@ -29,7 +29,7 @@
  * code in one CPP macro we use the following #defines for comparing
  * atoms:
  */
-#define simple_CMP(x,y,tpe)     (simple_LT(x,y,tpe)?-1:simple_GT(x,y,tpe))
+#define simple_CMP(x,y,tpe)     (simple_GT(x,y,tpe) - simple_LT(x,y,tpe))
 #define simple_EQ(x,y,tpe)      ((*(const tpe*) (x)) == (*(const tpe*) (y)))
 #define simple_NE(x,y,tpe,nl)   ((*(const tpe*)(y)) != nl && (*(const tpe*) 
(x)) != (*(const tpe*) (y)))
 #define simple_LT(x,y,tpe)      ((*(const tpe*) (x))  < (*(const tpe*) (y)))
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to