On Mon, 23 Nov 2009, Joe Perches wrote:
On Tue, 2009-11-24 at 00:08 +0200, Ilpo Järvinen wrote:
quoted
Certainly better in general already but there is still some work to be
done here as now you have an && only line. I guess it mostly has to do
with comments but #if... blahblahs could be another type of failure (in
automation like this).
The current form is
if (foo
#ifdef BAR
&& bar
#endif
)
Another option could be:
#ifdef BAR
if (foo && bar)
#else
if (foo)
#endif
In any case, it won't be pretty.
But wouldn't your automation produce:
#ifdef BAR
if (foo
#endif
&&
bar
? Like it did for the case where there was a comment between.
As I didn't go through the whole patch I don't know if there were in fact
any #if things that got made into that kind of construct or not (just
mentioned it that such places might also be affected incorrectly by your
automation). I only noticed one of such after comment (ie., && on
otherwise empty line) and hit reply.
--
i.