[Digikam-devel] Code not understandable
Andi Clemens
andi.clemens at gmx.net
Fri Nov 19 15:13:51 GMT 2010
Hi,
the following code is not understandable, it is not clear wether the following
lines are ment to be IN the foreach statement or outside of it:
GSOC2010 branch:
libs/database/imageinfo.cpp (lines 672-679).
It is not clear if the second if-statement belongs to the foreach loop. If it
does, the code is wrong.
This is why I beg you (:-)):
Please use curly brackets, ALWAYS!
At work we had so much trouble because of someone avoiding them for single
line code blocks, our customer finally found a bug because of this (which is
BAD for a software company, the customer shouldn't find this :-)).
The problem is that whenever you add code, chances are that you get misleading
/ wrong code like the example above.
So please, add curly brackets, everytime. It is not Python were indention is
clear enough, in the above example it is not and the code might be wrong.
Martin,
since you made the change, could you please fix it and set the curly brackets
accordingly?
Andi
More information about the Digikam-devel
mailing list