[Verse-dev] Numerical IDs [R4]
Eskil Steenberg
verse-dev@blender.org
Tue, 10 Aug 2004 17:55:07 +0300
Hi
> I was not talking about *node IDs*, I was talking about _all_
> numerical IDs.
I know, my arguing was that, its not that the way node ids work is
the standard way of handeling ids, Node id are the ones that are
different form the rest, so my arguing is that if you compani about
conssistency, the node ids are the ones that has to change.
> if(method_id == (uint8) ~0)
I assume this was a typo, you meant:
if(method_id == (uint8) ~1)
But my main question is when would you ever need to do this test?
verse would never send you a value that was -1, so the variable
method_id wouldent ever come from verse. And the test you do does
not garantee that the failiure of the test means that the id is
valid. In other wordts the only reason for theis test is the slight
optimization of an early detection of a broken reference.
So the invalid id is never used by verse, and are not very usefull
in any client end either. if zero was reserverd it would force
especialy host apps to have special code to handle this. I can agree
that the cast -1 isnt that nice so perhaps we would like to add
defines for it in verse.h
Next reason is that verse uses -1 internaly as an invalid valuee for
a lot of things. A change would upset a lot of things in areas where
you wouldent want them to change.
Cheers
E