[webkit-dev] Style guide for indenting nested #if #define in headers

Eric Seidel eric at webkit.org
Thu Oct 15 08:12:32 PDT 2009


I really like the indented style that some folks have started using:

#if foo
#    define BAR BAZ
#else
#    define BAR BARF
#endif

I think we should standardize on something and add it to the style guides.

-eric

On Thu, Oct 15, 2009 at 10:30 AM, Tor Arne Vestbø
<tor.arne.vestbo at nokia.com> wrote:
> Hey,
>
> Could not find anything in the style guide regarding indentation of nested
> #ifs/#ifdefs in headers, ie. not #ifdefs in normal code, where adding extra
> indentation would break the indentation of the surrounding code, but nested
> #ifdefs in files like Platform.h
>
> Personally I prefer indentation, for the same reason that we indent code
> (readability), but I just wanted to check if we have a guideline for this.
>
> Tor Arne
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>


More information about the webkit-dev mailing list