[webkit-dev] Idiom for functions with all return values in a switch case

Andy Estes aestes at apple.com
Tue May 9 11:46:19 PDT 2017



> On May 9, 2017, at 11:35 AM, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
> 
> Andy suggests returning one of the enumeration values directly, then we can use ASSERT_NOT_REACHED() instead of RELEASE_ASSERT_NOT_REACHED(). That would work too, though it forces me to think about which one to pick.

You had to think about that for static_cast<Enum>(0) as well, though. 0 might not be one of the enumerated values, for instance.

Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20170509/1d3a4727/attachment-0001.html>


More information about the webkit-dev mailing list