Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STYLE: Convert C++ source files from old-style "Whitesmiths" to "Allm…
…an" style This commit reindents the C++ source files to adhere to the "Allman" style, moving away from the outdated and VTK-specific "Whitesmiths" style. The changes are applied using an approach similar to the one utilized in Kitware/VTK@f830ff47b3 ("Reindent using the reindentation script," 2016-09-23). These modifications are made in anticipation of future changes that will introduce the use of a standard configuration based on clang-format. Steps Taken: 1. The script `Utilities/Maintenance/vtk_reindent_code.py` is executed, leveraging the approach from Kitware/VTK@b6fec283cc. The command used is as follows: ``` fd -e cxx -e h -e cpp -e cxx.in -e h.in -e txx -x \ python3.9 /path/to/VTK/Utilities/Maintenance/vtk_reindent_code.py {} ``` 2. Manual review and adjustments are performed to address the errors identified during the reindentation process (see below). 3. Update the indentations associated with macros to ensure proper alignment of backslashes. To identify the affected files, the following one-liner was utilized: ``` for file in $(git diff HEAD --name-only); do git diff HEAD -- $file | ack "\+.+\s\\\\$" > /dev/null 2>&1 && echo $file; done ``` Errors identified during the reindentation process: ``` Libs/MRML/Logic/vtkMRMLApplicationLogic.cxx:715: mismatched delimiter in "#ifdef WIN32" block Libs/MRML/Logic/vtkMRMLApplicationLogic.cxx:728: mismatched delimiter in "#else" block Libs/MRML/Logic/vtkMRMLApplicationLogic.cxx:715: mismatched delimiter in "#ifdef WIN32" block Libs/MRML/Logic/vtkMRMLApplicationLogic.cxx:728: mismatched delimiter in "#else" block Libs/MRML/DisplayableManager/vtkMRMLDisplayableManagerGroup.cxx:173: mismatched delimiter in "#ifdef MRMLDisplayableManager_USE_PYTHON" block Libs/MRML/DisplayableManager/vtkMRMLDisplayableManagerGroup.cxx:173: mismatched delimiter in "#ifdef MRMLDisplayableManager_USE_PYTHON" block Libs/MRML/Core/vtkMRMLVolumeSequenceStorageNode.cxx:128: mismatched delimiter in "#ifdef NRRD_CHUNK_IO_AVAILABLE" block Libs/MRML/Core/vtkMRMLVolumeSequenceStorageNode.cxx:142: mismatched delimiter in "#else" block Libs/MRML/Core/vtkMRMLVolumeSequenceStorageNode.cxx:128: mismatched delimiter in "#ifdef NRRD_CHUNK_IO_AVAILABLE" block Libs/MRML/Core/vtkMRMLVolumeSequenceStorageNode.cxx:142: mismatched delimiter in "#else" block Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:34: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:185: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:185: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:380: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:385: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:465: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:34: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:185: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:185: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:380: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:385: mismatched '}' Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:465: mismatched '}' Modules/Loadable/Colors/Logic/vtkSlicerColorLogic.cxx:179: mismatched delimiter in "#ifdef WIN32" block Modules/Loadable/Colors/Logic/vtkSlicerColorLogic.cxx:192: mismatched delimiter in "#else" block Modules/Loadable/Colors/Logic/vtkSlicerColorLogic.cxx:179: mismatched delimiter in "#ifdef WIN32" block Modules/Loadable/Colors/Logic/vtkSlicerColorLogic.cxx:192: mismatched delimiter in "#else" block ```
- Loading branch information