From fc8aa5183419843130789c6f0e84461481cb22af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Tue, 14 Feb 2012 11:00:45 +0100 Subject: [PATCH] Add macro IS_NIL Testing whether a node is NIL with < 0 rather than == -1 allows the compiler to know that a node is >= in subsequent code, thus opening the door to more aggressive optimizations. --- XMLTree.h | 1 + 1 file changed, 1 insertion(+) diff --git a/XMLTree.h b/XMLTree.h index 1cab2aa..d809bfc 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -94,6 +94,7 @@ typedef TagIdMap::const_iterator TagIdMapIT; // returns NULLT if the test is true #define NULLT_IF(x) do { if (x) return NULLT; } while (0) +#define IS_NIL(x) ((x) < 0) // Direct calls to sarray library -- 2.17.1