← Back to team overview

kicad-developers team mailing list archive

Re: New developer, SVN commits

 

> You patches was sucsessfully comitted to the KiCad SVN tree.
> Only "PolyLine.cpp.diff" was not applied because it doesn't have a sense 
> (Please, look at it twice).

I see you fixed it the other way (I was considering) by initializing variables to zero.
Either way makes the compiler happy and does not change the execution one bit.
My solution makes the code few bytes smaller :-)
(no initialization, one less 'if')
The only difference is if someone in the future changes the number of iterations of the 'for' loop.
In one case, the formulas use zeroed variables, in the other they use 'default' case.
The compiler accepts either solution.
The best way would be to add 'else' case with zeroed variables to cover all cases possible. I think we should always include a default case. Mistakes happen.
Martin

> 
> Martin, please, fill the information about yourself at
> http://kicad.sourceforge.net/wiki/index.php/About_developers

Done!


 




Follow ups