Hi John, regarding use of NULL, I'm mostly a C developer so I didn't realize this though I did see it used in many other places
# grep -R NULL * | grep ".cpp:" | wc -l 8307
I was also tempted to do other cleanups but thought it best not to tread on anyones toes where style is concerned, especially since it was my first commit to the source code (and not cmake).
But agree with your suggested changes.
On Sun, Jun 26, 2011 at 12:47 AM, Jon Cruz <jon@...18...> wrote:
On Jun 25, 2011, at 3:22 PM, Jon Cruz wrote:
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) )
Or to take this refinement a bit further (as ScislaC commented in IRC), one could fold out the other NULL
&& (((l != NULL) && !edge->isEnd(l->id)) || (l == 0) ) && (((l != 0) && !edge->isEnd(l->id)) || (l == 0) )
Then again, the test against NULL/0 is not required in C/C++
&& ((l && !edge->isEnd(l->id)) || !l )
but I can't read that in this font, so I'll do a before and after with a new name:
&&((el!=NULL&&!edge->isEnd(el->id))||el==NULL) && ( (el && !edge->isEnd(el->id)) || !el )
All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense.. http://p.sf.net/sfu/splunk-d2d-c1 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel