[Webkit-unassigned] [Bug 27501] New: Coding style - Clarify multiple line "if" condition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 21 07:50:09 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27501

           Summary: Coding style - Clarify multiple line "if" condition
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P2
         Component: WebKit Website
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: luciano.wolf at openbossa.org
                CC: kenneth.christiansen at openbossa.org


Clarify the case where the "if" condition spawns through multiple lines. Should
it use braces or not?

According to the Qt coding style[1] - braces section - it should use braces, so
not having this clarified might confuse Qt developers.

>From the Qt coding style document[1]:

    # Exception 1: Use braces also if the parent statement covers several lines
/ wraps

    // Correct
    if (address.isEmpty() || !isValid()  
        || !codec) {  
        return false;  
    }  


[1]
http://qt.gitorious.org/qt/pages/QtCodingStyle

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list