[vtk-developers] coding standards & switch case label accidental fallthrough

David Lonie david.lonie at kitware.com
Wed Apr 8 09:49:23 EDT 2015


+1 for the change. The explicit token is great for readability and will be
important as other compilers start warning about these.

-1 for forbidding them. A lot of times it just makes the most sense to use
a fall through, as long as it's clearly labeled as intentional.

On Tue, Apr 7, 2015 at 1:49 PM, Sean McBride <sean at rogue-research.com>
wrote:

> On Tue, 7 Apr 2015 13:42:51 -0400, David Cole said:
>
> >Is there really no way to refactor and simply eliminate all the
> >"intentional" fall throughs? It's a really nasty style to be allowing.
> >It should be discouraged in general.
>
> I did refactor a few, but most I left because I was scared to touch or
> they were pretty elegant with fall-through.  You can take a look:
>  <https://gitlab.kitware.com/vtk/vtk/merge_requests/59>
>
> I'd be in favour of the coding standards saying something like
> "fall-through is discouraged, but when necessary must be annotated with
> VTK_FALLTHROUGH".
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150408/7be4b6e0/attachment-0001.html>


More information about the vtk-developers mailing list