[webkit-dev] Code Style: Opinion on returning void

Daniel Bates dbates at webkit.org
Thu Feb 7 12:47:06 PST 2019


Hi all,

Something bothers me about code like:

void f();
void g()
{
    if (...)
        return f();
    return f();
}

I prefer:

void g()
{
    if (...) {
        f();
        return
    }
    f();
}

Does it bother you? For the former? For the latter? Update our style guide?

Opinions, please.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20190207/04c1df6e/attachment.html>


More information about the webkit-dev mailing list