[vtk-developers] Incorrect indentation by vtk_reindent_code.py

David Gobbi david.gobbi at gmail.com
Sat Jul 2 16:21:22 EDT 2016


Thanks, Bill.

My case-statement regex was confused by the parentheses in
"case(MFVEC3F):", and I completely missed the check for "if, else, switch"
etc. because they're almost always followed by "{" in VTK.

Here's an MR with the fixes:
https://gitlab.kitware.com/vtk/vtk/merge_requests/1613/diffs

Let me know if you find anything else.

 - David


On Sat, Jul 2, 2016 at 11:21 AM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> Also seems to have trouble with case statements...
> --- a/IO/Export/vtkX3DExporterXMLWriter.cxx
> +++ b/IO/Export/vtkX3DExporterXMLWriter.cxx
> @@ -211,17 +211,17 @@ void vtkX3DExporterXMLWriter::SetField(int
> attributeID, int type, vtkDataArray*
>    {
>    case(MFVEC3F):
>      for (vtkIdType i = 0; i < a->GetNumberOfTuples(); i++)
> -    {
> +  {
>
> On Sat, Jul 2, 2016 at 12:53 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
> > David,
> >
> > vtk_reindent_code.py has trouble with for loops after if blocks that
> > do not have braces.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160702/c1486d12/attachment.html>


More information about the vtk-developers mailing list