diff --git a/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.cxx b/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.cxx index 703d923eb41335d1a6186c91f2352388cdbf7182..ef1b8714bffbed5105fe993e3aca4b218a501481 100644 --- a/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.cxx +++ b/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.cxx @@ -18,7 +18,7 @@ #include "vtkAppendPolyData.h" #include "vtkPlane.h" -#include <math.h> +#include <cmath> vtkStandardNewMacro(AlignedThreeSliceFilter); diff --git a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.cxx b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.cxx index 5edce31a5ca28f8bd51dd5e665328918a6ae98b2..f7230cb6108e7c2ed40086ca3adf9b895b1c9ec6 100644 --- a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.cxx +++ b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.cxx @@ -85,7 +85,7 @@ public: return true; } static bool ExtractCachedBounds(vtkDataObject *dataObject, double bounds[6]) { - if (dataObject == NULL || dataObject->GetFieldData() == NULL) { + if (dataObject == nullptr || dataObject->GetFieldData() == nullptr) { return false; } vtkFieldData *fd = dataObject->GetFieldData(); @@ -108,9 +108,8 @@ public: static vtkGSRGeometryFilter *New(); vtkTypeMacro(vtkGSRGeometryFilter, vtkPVGeometryFilter); - virtual int RequestData(vtkInformation *req, - vtkInformationVector **inputVector, - vtkInformationVector *outputVector) VTK_OVERRIDE { + int RequestData(vtkInformation *req, vtkInformationVector **inputVector, + vtkInformationVector *outputVector) VTK_OVERRIDE { vtkSmartPointer<vtkDataObject> inputDO = vtkDataObject::GetData(inputVector[0]); vtkSmartPointer<vtkMatrix4x4> changeOfBasisMatrix = @@ -165,7 +164,7 @@ public: protected: vtkGSRGeometryFilter() {} - virtual ~vtkGSRGeometryFilter() {} + ~vtkGSRGeometryFilter() override {} private: vtkGSRGeometryFilter(const vtkGSRGeometryFilter &); @@ -214,7 +213,7 @@ void vtkAlignedGeometrySliceRepresentation::SetupDefaults() { this->Internals->OutlineSource->GetOutputPort()); this->Internals->OutlineActor->SetMapper( this->Internals->OutlineMapper.GetPointer()); - this->Internals->OutlineActor->SetUseBounds(0); + this->Internals->OutlineActor->SetUseBounds(false); this->Internals->OutlineActor->SetVisibility(0); } diff --git a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h index 1e24e767c3bd85c30b843c992bfb12c348d4e559..9bfad8b3434ab0b91ab862237de9435cfb4765f2 100644 --- a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h +++ b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h @@ -35,9 +35,9 @@ public: vtkGeometryRepresentation); void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE; - virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, - vtkInformation *inInfo, - vtkInformation *outInfo) VTK_OVERRIDE; + int ProcessViewRequest(vtkInformationRequestKey *request_type, + vtkInformation *inInfo, + vtkInformation *outInfo) VTK_OVERRIDE; enum { X_SLICE_ONLY, Y_SLICE_ONLY, Z_SLICE_ONLY, ALL_SLICES }; vtkSetClampMacro(Mode, int, X_SLICE_ONLY, ALL_SLICES); @@ -53,15 +53,14 @@ public: protected: vtkAlignedGeometrySliceRepresentation(); - ~vtkAlignedGeometrySliceRepresentation(); + ~vtkAlignedGeometrySliceRepresentation() override; - virtual void SetupDefaults() VTK_OVERRIDE; - virtual int RequestData(vtkInformation *request, - vtkInformationVector **inputVector, - vtkInformationVector *outputVector) VTK_OVERRIDE; + void SetupDefaults() VTK_OVERRIDE; + int RequestData(vtkInformation *request, vtkInformationVector **inputVector, + vtkInformationVector *outputVector) VTK_OVERRIDE; - virtual bool AddToView(vtkView *view) VTK_OVERRIDE; - virtual bool RemoveFromView(vtkView *view) VTK_OVERRIDE; + bool AddToView(vtkView *view) VTK_OVERRIDE; + bool RemoveFromView(vtkView *view) VTK_OVERRIDE; private: vtkAlignedGeometrySliceRepresentation( diff --git a/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp index 72f9f932108be9198b967126a34b4757b1d3aa21..301e885bcd6d0fed8a3ddfa8f77a8a91eb3ccf92 100644 --- a/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp @@ -44,7 +44,7 @@ EventNexusLoadingPresenter::EventNexusLoadingPresenter( */ bool EventNexusLoadingPresenter::canReadFile() const { if (!canLoadFileBasedOnExtension(m_filename, ".nxs")) { - return 0; + return false; } std::unique_ptr<NeXus::File> file; @@ -55,7 +55,7 @@ bool EventNexusLoadingPresenter::canReadFile() const { file->openGroup("entry", "NXentry"); } catch (::NeXus::Exception &) { file->close(); - return 0; + return false; } // But only eventNexus files have bank123_events as a group name std::map<std::string, std::string> entries = file->getEntries(); @@ -74,7 +74,7 @@ bool EventNexusLoadingPresenter::canReadFile() const { if (file) file->close(); } - return 0; + return false; } /* diff --git a/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp index 81cc8b7afd0a2764e51dec715f01108be679c5ea..02d1db6ebf552f3778e264aca8b201e7429a107d 100644 --- a/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp @@ -43,19 +43,19 @@ is attempted to be loaded. bool MDEWEventNexusLoadingPresenter::canReadFile() const { // Quick check based on extension. if (!canLoadFileBasedOnExtension(m_filename, ".nxs")) { - return 0; + return false; } auto file = Kernel::make_unique<::NeXus::File>(this->m_filename); // MDEventWorkspace file has a different name for the entry try { file->openGroup("MDEventWorkspace", "NXentry"); - return 1; + return true; } catch (::NeXus::Exception &) { // If the entry name does not match, then it can't read the file. - return 0; + return false; } - return 0; + return false; } /* diff --git a/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp index e8654c3c990a163327961a2d90c1ba6170b48bfa..92eaa9ad25f37c84016930f9d38dceac933a4f5e 100644 --- a/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp @@ -43,18 +43,18 @@ MDHWNexusLoadingPresenter::MDHWNexusLoadingPresenter( bool MDHWNexusLoadingPresenter::canReadFile() const { // Quick check based on extension. if (!canLoadFileBasedOnExtension(m_filename, ".nxs")) { - return 0; + return false; } auto file = Kernel::make_unique<::NeXus::File>(this->m_filename); // MDHistoWorkspace file has a different name for the entry try { file->openGroup("MDHistoWorkspace", "NXentry"); - return 1; + return true; } catch (::NeXus::Exception &) { // If the entry name does not match, then it can't read the file. - return 0; + return false; } - return 0; + return false; } /** diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp index 75b67ee37970f2714b40fca42a7e3e9bb41fe101..bf37322877cfa255ab623cbd0e0521b1f17d7ac0 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp @@ -93,7 +93,7 @@ void pqCameraReactionNonOrthogonalAxes::updateEnableState() { this->parentAction()->setEnabled(true); } else if (rview) { if (this->ReactionMode == ZOOM_TO_DATA) { - this->parentAction()->setEnabled(source != 0); + this->parentAction()->setEnabled(source != nullptr); } else { // Check hints to see if actions should be disabled bool cameraResetButtonsEnabled = true; diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp index 1b9410c7dffefc0e3974689cbfe763d803092a61..9482ec1aa71da8e20962e34b1ae989c0bf39f188 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp @@ -68,7 +68,7 @@ void pqCameraToolbarNonOrthogonalAxes::constructor() { this->ZoomToDataAction = ui.actionZoomToData; this->ZoomToDataAction->setEnabled( - pqActiveObjects::instance().activeSource() != 0); + pqActiveObjects::instance().activeSource() != nullptr); QObject::connect(&pqActiveObjects::instance(), SIGNAL(viewChanged(pqView *)), this, SLOT(updateEnabledState()));