[webkit-dev] !!Tests for equality comparison

Chris Dumez cdumez at apple.com
Fri Apr 28 08:28:33 PDT 2017




> On Apr 28, 2017, at 8:10 AM, Geoffrey Garen <ggaren at apple.com> wrote:
> 
> Tests for numeric values where 0 indicates falsiness or emptiness should also use if (x) / if (!x).
> 
>    If (!collection.size())
>        return;


I think if (collection.isEmpty()) looks even better :)

--
 Chris Dumez

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20170428/cc3a13ec/attachment.html>


More information about the webkit-dev mailing list