* negative node-ids are special values that denote dummy nodes
or errors, since valide nodes are positive, refusing the root
with <= 0 rather than == 0 tells the compiler that the value
of the id is (strictly) positive in the subsequent code,
allowing the compiler to perform more agressive optimisations.
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/bp@1219
3cdefd35-fc62-479d-8e8d-
bae585ffb9ca
pb x;\r
pb *q;\r
\r
- if (i == 0) return -1;\r
-\r
- if (i > da->m) {\r
- return -1;\r
- //printf("ERROR: m=%d i=%d\n",da->m,i);\r
- //exit(1);\r
- }\r
+ if (i <= 0 || i > da->m) return -1;\r
\r
i--;\r
\r