From 3bbbae84d7a23f5127daae05925f042628d7344e Mon Sep 17 00:00:00 2001 From: Uwe Date: Sat, 26 Mar 2022 04:32:17 +0100 Subject: [PATCH] [skip CI] [FEM] remove an unused header - also some code styles improvements --- src/Mod/Fem/App/FemAnalysis.cpp | 19 ++++++++----------- .../Fem/Gui/ViewProviderFemPostPipeline.cpp | 17 ++++++++--------- src/Mod/Fem/Gui/ViewProviderResult.cpp | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/Mod/Fem/App/FemAnalysis.cpp b/src/Mod/Fem/App/FemAnalysis.cpp index 1d70c8afdc..bc2f075d6e 100644 --- a/src/Mod/Fem/App/FemAnalysis.cpp +++ b/src/Mod/Fem/App/FemAnalysis.cpp @@ -20,18 +20,15 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#ifndef _PreComp_ -#endif - -#include "FemAnalysis.h" #include #include -#include #include +#include "FemAnalysis.h" + + using namespace Fem; using namespace App; @@ -41,16 +38,16 @@ PROPERTY_SOURCE(Fem::FemAnalysis, App::DocumentObjectGroup) FemAnalysis::FemAnalysis() { Base::Uuid id; - ADD_PROPERTY_TYPE(Uid,(id),0,App::Prop_None,"UUID of the Analysis"); + ADD_PROPERTY_TYPE(Uid, (id), 0, App::Prop_None, "UUID of the Analysis"); } FemAnalysis::~FemAnalysis() { } -void FemAnalysis::handleChangedPropertyName(Base::XMLReader &reader, - const char * TypeName, - const char *PropName) +void FemAnalysis::handleChangedPropertyName(Base::XMLReader& reader, + const char* TypeName, + const char* PropName) { Base::Type type = Base::Type::fromName(TypeName); if (Group.getClassTypeId() == type && strcmp(PropName, "Member") == 0) { @@ -101,7 +98,7 @@ template<> const char* Fem::FeaturePython::getViewProviderName(void) const { template<> PyObject* Fem::FeaturePython::getPyObject(void) { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new App::FeaturePythonPyT(this),true); + PythonObject = Py::Object(new App::FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp index 139fe1b762..ee2a3b5b32 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #include "ViewProviderFemPostPipeline.h" #include "ViewProviderFemPostFunction.h" @@ -47,7 +46,7 @@ std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren(v Fem::FemPostPipeline* pipeline = static_cast(getObject()); std::vector children; - if(pipeline->Functions.getValue()) + if (pipeline->Functions.getValue()) children.push_back(pipeline->Functions.getValue()); children.insert(children.end(), pipeline->Filter.getValues().begin(), pipeline->Filter.getValues().end()); @@ -62,7 +61,7 @@ std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren3D void ViewProviderFemPostPipeline::updateData(const App::Property* prop) { FemGui::ViewProviderFemPostObject::updateData(prop); - if(strcmp(prop->getName(), "Function") == 0) { + if (strcmp(prop->getName(), "Function") == 0) { updateFunctionSize(); } @@ -73,18 +72,18 @@ void ViewProviderFemPostPipeline::updateFunctionSize() { //we need to get the bounding box and set the function provider size Fem::FemPostPipeline* obj = static_cast(getObject()); - if(!obj->Functions.getValue() || !obj->Functions.getValue()->isDerivedFrom(Fem::FemPostFunctionProvider::getClassTypeId())) + if (!obj->Functions.getValue() || !obj->Functions.getValue()->isDerivedFrom(Fem::FemPostFunctionProvider::getClassTypeId())) return; //get the function provider FemGui::ViewProviderFemPostFunctionProvider* vp = static_cast( - Gui::Application::Instance->getViewProvider(obj->Functions.getValue())); + Gui::Application::Instance->getViewProvider(obj->Functions.getValue())); - if(obj->Data.getValue() && obj->Data.getValue()->IsA("vtkDataSet")) { + if (obj->Data.getValue() && obj->Data.getValue()->IsA("vtkDataSet")) { vtkBoundingBox box = obj->getBoundingBox(); - vp->SizeX.setValue(box.GetLength(0)*1.2); - vp->SizeY.setValue(box.GetLength(1)*1.2); - vp->SizeZ.setValue(box.GetLength(2)*1.2); + vp->SizeX.setValue(box.GetLength(0) * 1.2); + vp->SizeY.setValue(box.GetLength(1) * 1.2); + vp->SizeZ.setValue(box.GetLength(2) * 1.2); } } diff --git a/src/Mod/Fem/Gui/ViewProviderResult.cpp b/src/Mod/Fem/Gui/ViewProviderResult.cpp index be020afa7c..f9d8c45af6 100644 --- a/src/Mod/Fem/Gui/ViewProviderResult.cpp +++ b/src/Mod/Fem/Gui/ViewProviderResult.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" -#include "Gui/Command.h" +#include #include "ViewProviderResult.h"