qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/5] CODING_STYLE: add preprocessor rules
Date: Sun, 15 Aug 2010 09:59:26 +0200

Am 15.08.2010 um 09:46 schrieb Blue Swirl:

On Sat, Aug 14, 2010 at 2:27 PM, Andreas Färber <address@hidden > wrote:
While indentation is nice to read, it is patch-unfriendly.

Consider:

#ifdef SOMETHINGNEW
yay
#else // previous stuff follows

#if defined(OLDONE)
#  define one
#endif
foo
bar
#if defined(OLDTWO)
#  define two
#endif

#endif

Here, adding four lines would require to reindent six lines otherwise not
changed, making merging and review harder.

I don't quite follow the example,

The middle part would need to become:

#  if defined(OLDONE)
#    define one
#  endif
foo
bar
#  if defined(OLDTWO)
#    define two
#  endif

if we applied the rule. Purely syntactic example.

but is the situation different from
adding a C 'if' statement and adjusting the indentation?

No, you're right, it isn't. Just that we previously applied such changes for Windows or Solaris and did not need to reindent.

Cheers,
Andreas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]