Skip to content

Commit

Permalink
STYLE: Add missing semicolon after statement macros
Browse files Browse the repository at this point in the history
These changes are done anticipating the integration of "clang-format" for
automated formatting of source files.

Changes were identified using the following one-liners:

```
cd Slicer
ack -i "^[\s\/]*(ctk|itk|slicer|vtk)\s*[0-9a-zA-Z]+\([\,a-zA-Z0-9\s]+\)$"
ack "Q_UNUSED\([\,a-zA-Z0-9\s]+\)$"
ack "Q_[^P][A-Za-z0-9]+\([\,a-zA-Z0-9\s]+\)$" # To identify use of "Q_*" macros excluding "Q_PROPERTY"
```
  • Loading branch information
jcfr committed Feb 23, 2024
1 parent fde6310 commit 1b8adc0
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Base/QTCore/qSlicerCoreApplication.cxx
Expand Up @@ -2098,7 +2098,7 @@ void qSlicerCoreApplication::loadTranslations(const QString& dir)
app->installTranslator(translator);
}
#else
Q_UNUSED(dir)
Q_UNUSED(dir);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions Base/QTGUI/qSlicerWebWidget.cxx
Expand Up @@ -486,8 +486,8 @@ void qSlicerWebWidget::handleSslErrors(QNetworkReply* reply,
const QList<QSslError> &errors)
{
#ifdef QT_NO_SSL
Q_UNUSED(reply)
Q_UNUSED(errors)
Q_UNUSED(reply);
Q_UNUSED(errors);
#else
foreach (QSslError e, errors)
{
Expand Down
2 changes: 1 addition & 1 deletion Libs/MRML/Core/vtkMRMLAbstractViewNode.cxx
Expand Up @@ -133,7 +133,7 @@ void vtkMRMLAbstractViewNode::ReadXMLAttributes(const char** atts)
// the mrml version. Scene with a newer version number would consider the
// serialized attribute whereas older scene would not.
//
// vtkMRMLReadXMLBooleanMacro(visibility, Visibility)
// vtkMRMLReadXMLBooleanMacro(visibility, Visibility);

vtkMRMLReadXMLVectorMacro(backgroundColor, BackgroundColor, double, 3);
vtkMRMLReadXMLVectorMacro(backgroundColor2, BackgroundColor2, double, 3);
Expand Down
2 changes: 1 addition & 1 deletion Libs/MRML/Core/vtkMRMLModelNode.h
Expand Up @@ -100,7 +100,7 @@ class VTK_MRML_EXPORT vtkMRMLModelNode : public vtkMRMLDisplayableNode

/// Return the input mesh pipeline.
/// \sa GetPolyDataConnection(), GetUnstructuredGridConnection()
vtkGetObjectMacro(MeshConnection,vtkAlgorithmOutput)
vtkGetObjectMacro(MeshConnection,vtkAlgorithmOutput);

/// Return the input mesh pipeline if the mesh
/// is a polydata.
Expand Down
4 changes: 2 additions & 2 deletions Libs/MRML/Core/vtkMRMLNode.cxx
Expand Up @@ -306,7 +306,7 @@ void vtkMRMLNode::PrintSelf(ostream& os, vtkIndent indent)
vtkMRMLPrintBooleanMacro(HideFromEditors);
vtkMRMLPrintBooleanMacro(Selectable);
vtkMRMLPrintBooleanMacro(Selected);
vtkMRMLPrintBooleanMacro(UndoEnabled)
vtkMRMLPrintBooleanMacro(UndoEnabled);
vtkMRMLPrintEndMacro();

if (!this->Attributes.empty())
Expand Down Expand Up @@ -367,7 +367,7 @@ void vtkMRMLNode::ReadXMLAttributes(const char** atts)
vtkMRMLReadXMLBooleanMacro(selectable, Selectable);
vtkMRMLReadXMLBooleanMacro(selected, Selected);
vtkMRMLReadXMLStringMacro(singletonTag, SingletonTag);
vtkMRMLReadXMLBooleanMacro(undoEnabled, UndoEnabled)
vtkMRMLReadXMLBooleanMacro(undoEnabled, UndoEnabled);
vtkMRMLReadXMLEndMacro();

std::set<std::string> references;
Expand Down
4 changes: 2 additions & 2 deletions Libs/MRML/Core/vtkMRMLProceduralColorNode.h
Expand Up @@ -116,12 +116,12 @@ class VTK_MRML_EXPORT vtkMRMLProceduralColorNode : public vtkMRMLColorNode
/// Get number of entries used when discretizing
/// the color transfer function into a lookup table
/// \sa SetNumberOfTableValues(), GetLookupTable()
vtkGetMacro(NumberOfTableValues, unsigned int)
vtkGetMacro(NumberOfTableValues, unsigned int);

/// Set number of entries used when discretizing
/// the color transfer function into a lookup table
/// \sa GetNumberOfTableValues(), GetLookupTable()
vtkSetMacro(NumberOfTableValues, unsigned int)
vtkSetMacro(NumberOfTableValues, unsigned int);

protected:
vtkMRMLProceduralColorNode();
Expand Down
8 changes: 4 additions & 4 deletions Libs/MRML/Core/vtkMRMLScene.cxx
Expand Up @@ -106,10 +106,10 @@ Version: $Revision: 1.18 $
# include <vtkTimerLog.h>
#endif

vtkCxxSetObjectMacro(vtkMRMLScene, CacheManager, vtkCacheManager)
vtkCxxSetObjectMacro(vtkMRMLScene, DataIOManager, vtkDataIOManager)
vtkCxxSetObjectMacro(vtkMRMLScene, UserTagTable, vtkTagTable)
vtkCxxSetObjectMacro(vtkMRMLScene, URIHandlerCollection, vtkCollection)
vtkCxxSetObjectMacro(vtkMRMLScene, CacheManager, vtkCacheManager);
vtkCxxSetObjectMacro(vtkMRMLScene, DataIOManager, vtkDataIOManager);
vtkCxxSetObjectMacro(vtkMRMLScene, UserTagTable, vtkTagTable);
vtkCxxSetObjectMacro(vtkMRMLScene, URIHandlerCollection, vtkCollection);

//------------------------------------------------------------------------------
vtkMRMLScene::vtkMRMLScene()
Expand Down
6 changes: 3 additions & 3 deletions Libs/MRML/Core/vtkMRMLSliceNode.h
Expand Up @@ -268,7 +268,7 @@ class VTK_MRML_EXPORT vtkMRMLSliceNode : public vtkMRMLAbstractViewNode
///
/// Number of samples in each direction
/// -- note that the spacing is implicitly FieldOfView / Dimensions
vtkGetVectorMacro(Dimensions,int,3)
vtkGetVectorMacro(Dimensions,int,3);
void SetDimensions(int x, int y, int z);
void SetDimensions(int xyz[3]) { SetDimensions(xyz[0], xyz[1], xyz[2]); }

Expand All @@ -279,13 +279,13 @@ class VTK_MRML_EXPORT vtkMRMLSliceNode : public vtkMRMLAbstractViewNode
/// to the full Dimensions
/// -- note that z, the number of slices, should be the same for both
/// Dimensions and UVWDimensions
vtkGetVectorMacro(UVWDimensions,int,3)
vtkGetVectorMacro(UVWDimensions,int,3);
void SetUVWDimensions(int x, int y, int z);
void SetUVWDimensions(int xyz[3]);

///
/// maximum limit for UVWDimensions
vtkGetVectorMacro(UVWMaximumDimensions,int,3)
vtkGetVectorMacro(UVWMaximumDimensions,int,3);
void SetUVWMaximumDimensions(int x, int y, int z);
void SetUVWMaximumDimensions(int xyz[3]);

Expand Down
2 changes: 1 addition & 1 deletion Libs/MRML/Core/vtkMRMLStorageNode.cxx
Expand Up @@ -37,7 +37,7 @@ Version: $Revision: 1.1.1.1 $
#include <sstream>

//----------------------------------------------------------------------------
vtkCxxSetObjectMacro(vtkMRMLStorageNode, URIHandler, vtkURIHandler)
vtkCxxSetObjectMacro(vtkMRMLStorageNode, URIHandler, vtkURIHandler);

//----------------------------------------------------------------------------
vtkMRMLStorageNode::vtkMRMLStorageNode()
Expand Down
4 changes: 2 additions & 2 deletions Libs/MRML/Core/vtkMRMLTransformDisplayNode.cxx
Expand Up @@ -167,10 +167,10 @@ void vtkMRMLTransformDisplayNode::WriteXML(ostream& of, int nIndent)
vtkMRMLWriteXMLFloatMacro(InteractionSizeMm, InteractionSizeMm);
vtkMRMLWriteXMLFloatMacro(InteractionScalePercent, InteractionScalePercent);
vtkMRMLWriteXMLVectorMacro(TranslationHandleComponentVisibility3D, TranslationHandleComponentVisibility3D, bool, 4);
vtkMRMLWriteXMLVectorMacro(RotationHandleComponentVisibility3D, RotationHandleComponentVisibility3D, bool, 4)
vtkMRMLWriteXMLVectorMacro(RotationHandleComponentVisibility3D, RotationHandleComponentVisibility3D, bool, 4);
vtkMRMLWriteXMLVectorMacro(ScaleHandleComponentVisibility3D, ScaleHandleComponentVisibility3D, bool, 4);
vtkMRMLWriteXMLVectorMacro(TranslationHandleComponentVisibilitySlice, TranslationHandleComponentVisibilitySlice, bool, 4);
vtkMRMLWriteXMLVectorMacro(RotationHandleComponentVisibilitySlice, RotationHandleComponentVisibilitySlice, bool, 4)
vtkMRMLWriteXMLVectorMacro(RotationHandleComponentVisibilitySlice, RotationHandleComponentVisibilitySlice, bool, 4);
vtkMRMLWriteXMLVectorMacro(ScaleHandleComponentVisibilitySlice, ScaleHandleComponentVisibilitySlice, bool, 4);

vtkMRMLWriteXMLEndMacro();
Expand Down
2 changes: 1 addition & 1 deletion Libs/vtkITK/vtkITKImageThresholdCalculator.h
Expand Up @@ -93,6 +93,6 @@ class VTK_ITK_EXPORT vtkITKImageThresholdCalculator : public vtkImageAlgorithm
void operator=(const vtkITKImageThresholdCalculator&) = delete;
};

//vtkStandardNewMacro(vtkITKImageThresholdCalculator)
//vtkStandardNewMacro(vtkITKImageThresholdCalculator);

#endif
2 changes: 1 addition & 1 deletion Libs/vtkITK/vtkITKImageWriter.h
Expand Up @@ -96,6 +96,6 @@ class VTK_ITK_EXPORT vtkITKImageWriter : public vtkImageAlgorithm
void operator=(const vtkITKImageWriter&) = delete;
};

//vtkStandardNewMacro(vtkITKImageWriter)
//vtkStandardNewMacro(vtkITKImageWriter);

#endif
Expand Up @@ -38,7 +38,7 @@
#include <sstream>

//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkSlicerAnnotationModuleLogic)
vtkStandardNewMacro(vtkSlicerAnnotationModuleLogic);

//-----------------------------------------------------------------------------
// vtkSlicerAnnotationModuleLogic methods
Expand Down
Expand Up @@ -33,7 +33,7 @@ class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationSnapshotNode :
const char* GetIcon() override {return ":/Icons/ViewCamera.png";}

void SetSnapshotDescription(const vtkStdString& newDescription);
vtkGetMacro(SnapshotDescription, vtkStdString)
vtkGetMacro(SnapshotDescription, vtkStdString);

void WriteXML(ostream& of, int nIndent) override;
void ReadXMLAttributes(const char** atts) override;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Loadable/Markups/MRML/vtkMRMLMarkupsNode.cxx
Expand Up @@ -319,7 +319,7 @@ void vtkMRMLMarkupsNode::PrintSelf(ostream& os, vtkIndent indent)
vtkMRMLPrintBeginMacro(os, indent);
vtkMRMLPrintBooleanMacro(Locked);
vtkMRMLPrintStdStringMacro(ControlPointLabelFormat);
vtkMRMLPrintMatrix4x4Macro(InteractionHandleToWorldMatrix)
vtkMRMLPrintMatrix4x4Macro(InteractionHandleToWorldMatrix);
vtkMRMLPrintEndMacro();

os << indent << "Control point number locked: ";
Expand Down
Expand Up @@ -479,7 +479,7 @@ void qSlicerSimpleMarkupsWidget::onMarkupsControlPointsTableContextMenu(const QP
//-----------------------------------------------------------------------------
void qSlicerSimpleMarkupsWidget::onMarkupsControlPointSelected(int row, int column)
{
Q_UNUSED(column)
Q_UNUSED(column);
Q_D(qSlicerSimpleMarkupsWidget);

if (d->JumpToSliceEnabled)
Expand Down
Expand Up @@ -18,7 +18,7 @@
#include <sstream>

//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkSlicerSceneViewsModuleLogic)
vtkStandardNewMacro(vtkSlicerSceneViewsModuleLogic);

//-----------------------------------------------------------------------------
// vtkSlicerSceneViewsModuleLogic methods
Expand Down
Expand Up @@ -1661,7 +1661,7 @@ bool qSlicerTerminologyNavigatorWidget::setCurrentType(vtkSlicerTerminologyType*
//-----------------------------------------------------------------------------
void qSlicerTerminologyNavigatorWidget::onTypeSelected(QTableWidgetItem* currentItem, QTableWidgetItem* previousItem)
{
Q_UNUSED(previousItem)
Q_UNUSED(previousItem);
Q_D(qSlicerTerminologyNavigatorWidget);

if (!currentItem)
Expand Down Expand Up @@ -2258,7 +2258,7 @@ bool qSlicerTerminologyNavigatorWidget::setCurrentRegion(vtkSlicerTerminologyTyp
//-----------------------------------------------------------------------------
void qSlicerTerminologyNavigatorWidget::onRegionSelected(QTableWidgetItem* currentItem, QTableWidgetItem* previousItem)
{
Q_UNUSED(previousItem)
Q_UNUSED(previousItem);
Q_D(qSlicerTerminologyNavigatorWidget);

if (!currentItem)
Expand Down
Expand Up @@ -198,7 +198,7 @@ void qSlicerDICOMExportDialog::makeDialogSelections()
//-----------------------------------------------------------------------------
void qSlicerDICOMExportDialog::onCurrentItemChanged(vtkIdType itemID)
{
Q_UNUSED(itemID)
Q_UNUSED(itemID);
Q_D(qSlicerDICOMExportDialog);

// Clear error label
Expand Down

0 comments on commit 1b8adc0

Please sign in to comment.