[webkit-dev] [Coding Style] Clarification about multiple assignments on one line
Eric Seidel
eric at webkit.org
Fri Feb 22 14:43:10 PST 2013
I have no objection to us using this compiler feature.
On Fri, Feb 22, 2013 at 2:35 PM, Julien Chaffraix <jchaffraix at webkit.org>wrote:
> Hi WebKit folks,
>
> over several reviews, I have been saying that the following line is a
> coding style violation:
>
> firstVariable = secondVariable = 0;
>
> For a concrete example, the computePreferredLogicalWidths uses the
> following pattern:
>
> minWidth = maxWidth = max<int>(minWidth, tableLogicalWidth.value());
>
> My justification is that those are 2 statements and thus should be on
> 2 lines per "Each statement should get its own line.". Some people
> consider that the previous rule doesn't apply to multiple assignments
> on one line and that such code is fine by the book.
>
> What do people think?
>
> Thanks,
> Julien
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130222/96dddde9/attachment.html>
More information about the webkit-dev
mailing list