[vtk-developers] int to bool patch, white space convention?
Sean McBride
sean at rogue-research.com
Mon Nov 16 23:35:20 EST 2015
Hi all,
I'm working on a patch that changes some VTK APIs that use 'int' to instead use 'bool'. I've used a bunch of regexes to find vtkBooleanMacro uses, ex:
vtkSetMacro\((.*),int\);\r vtkGetMacro\(\1,int\);\r vtkBooleanMacro\(\1,int\);
I've discovered there's a variety of a) whitespace b) ordering, ex:
vtkSetMacro(foo, bool);
vtkGetMacro(foo, bool);
vtkBooleanMacro(foo, bool);
vs
vtkBooleanMacro(bar,bool);
vtkSetMacro(bar,bool);
vtkGetMacro(bar,bool);
Shall I take this opportunity to make everything uniform?
The most common form is:
vtkSetMacro(foo,int);
vtkGetMacro(foo,int);
vtkBooleanMacro(foo,int);
The 2nd most common is the same order, but with a space after the comma. The style guide seems to have examples of both. Is one preferred?
Here's my WIP:
<https://gitlab.kitware.com/vtk/vtk/merge_requests/917>
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list