Hi Campbell,
I just wanted to thank you for the recent improvement to our codebase, such as in revision 10359. Getting things fixed such as not passing 'false' in to pointers helps in many ways, including reducing the number of odd, hard to reproduce bugs.
I also just wanted to point out a few minor style points that could help. One is with the use of "NULL". That is more of a C macro that in C++ has be replaced with the simple use of "0". I've looked into this point with coworkers and others at various points, and can try to dig up more details if you need them.
The other point is in using whitespace. I realize that in your recent changes you have been preserving what already existed, but it is helpful if "cleanup" that touched lines left them with nicer spacing also.
We have some info on our coding style page, but the gist is to put spaces between things, but not in the middle of things. :-)
That is, space around keywords, operators, etc, but not between a function name and its opening paren.
For example, this line you touched could be improved by spacing it thusly
&&((l!=NULL&&!edge->isEnd(l->id))||l==NULL) && ((l != NULL && !edge->isEnd(l->id)) || l == NULL)
Suddenly that makes the logic and the referencing easier to read and follow. It also gives more visibility to areas that could be made clearer with more parenthesis:
&& (((l != NULL) && !edge->isEnd(l->id)) || (l == 0) )
if I compare those right on top of each other, the legibility change should show up:
&&((l!=NULL&&!edge->isEnd(l->id))||l==NULL) && (((l != NULL) && !edge->isEnd(l->id)) || (l == 0) )
Depending on the font, that might even reveal another problem. In general I strongly dislike single-letter literals (except for the common 'i' in for loops, etc). And even worse is the single letter variable 'l'. In fact, in the font I'm typing with at the moment I can not tell the difference between the lower-case-letter-el, the capital-letter-eye and the vertical-bar-pipe-| (lI|). What is worse is some fonts even make the numeral -one indistinguishable. But this is a side rant on a given bad variable. If you happen to be touching enough lines, consider giving it a better name.
Anyway, thanks for the help in this area and the opportunity for me to point out to some of the other newer people on the list what sort of tweaks can help our codebase be more legible and maintainable.