From a7172cd730cc8dd85ee2ab6e524fc7e5fb6aba30 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 1 Aug 2022 01:29:47 +0200 Subject: [PATCH] App: improve whitespaces --- src/App/Annotation.cpp | 14 +++++++------- src/App/Application.cpp | 4 ++-- src/App/DocumentObserverPython.cpp | 8 ++++---- src/App/DynamicProperty.cpp | 2 +- src/App/Expression.cpp | 2 +- src/App/Expression.h | 4 ++-- src/App/MergeDocuments.h | 1 + src/App/PropertyGeo.cpp | 6 +++--- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/App/Annotation.cpp b/src/App/Annotation.cpp index b0b5939349..ad5ac9134a 100644 --- a/src/App/Annotation.cpp +++ b/src/App/Annotation.cpp @@ -30,10 +30,10 @@ using namespace App; PROPERTY_SOURCE(App::Annotation, App::DocumentObject) -Annotation::Annotation() +Annotation::Annotation() { - ADD_PROPERTY(LabelText ,("")); - ADD_PROPERTY(Position,(Base::Vector3d())); + ADD_PROPERTY(LabelText, ("")); + ADD_PROPERTY(Position, (Base::Vector3d())); } Annotation::~Annotation() = default; @@ -43,11 +43,11 @@ Annotation::~Annotation() = default; PROPERTY_SOURCE(App::AnnotationLabel, App::DocumentObject) -AnnotationLabel::AnnotationLabel() +AnnotationLabel::AnnotationLabel() { - ADD_PROPERTY_TYPE(LabelText,(""),"Label",Prop_Output,"Text label of the annotation"); - ADD_PROPERTY_TYPE(BasePosition,(Base::Vector3d()),"Label",Prop_Output,"Base position"); - ADD_PROPERTY_TYPE(TextPosition,(Base::Vector3d()),"Label",Prop_Output,"Text position"); + ADD_PROPERTY_TYPE(LabelText, (""), "Label",Prop_Output, "Text label of the annotation"); + ADD_PROPERTY_TYPE(BasePosition, (Base::Vector3d()), "Label", Prop_Output, "Base position"); + ADD_PROPERTY_TYPE(TextPosition, (Base::Vector3d()), "Label", Prop_Output, "Text position"); } AnnotationLabel::~AnnotationLabel() = default; diff --git a/src/App/Application.cpp b/src/App/Application.cpp index b6b3041393..ce4d51968a 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -140,7 +140,7 @@ # include #endif -FC_LOG_LEVEL_INIT("App",true,true) +FC_LOG_LEVEL_INIT("App", true, true) using namespace App; using namespace Base; @@ -159,7 +159,7 @@ ParameterManager *App::Application::_pcUserParamMngr; Base::ConsoleObserverStd *Application::_pConsoleObserverStd = nullptr; Base::ConsoleObserverFile *Application::_pConsoleObserverFile = nullptr; -AppExport std::map Application::mConfig; +AppExport std::map Application::mConfig; // Custom Python exception types BaseExport extern PyObject* Base::PyExc_FC_GeneralError; diff --git a/src/App/DocumentObserverPython.cpp b/src/App/DocumentObserverPython.cpp index d13a29ceee..8032a714af 100644 --- a/src/App/DocumentObserverPython.cpp +++ b/src/App/DocumentObserverPython.cpp @@ -253,8 +253,8 @@ void DocumentObserverPython::slotCloseTransaction(bool abort) } } -void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc, const App::Property& Prop) -{ +void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc, const App::Property& Prop) +{ Base::PyGILStateLocker lock; try { Py::Tuple args(2); @@ -273,7 +273,7 @@ void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc, } } -void DocumentObserverPython::slotChangedDocument(const App::Document& Doc, const App::Property& Prop) +void DocumentObserverPython::slotChangedDocument(const App::Document& Doc, const App::Property& Prop) { Base::PyGILStateLocker lock; try { @@ -487,7 +487,7 @@ void DocumentObserverPython::slotRemoveDynamicProperty(const App::Property& Prop catch (Py::Exception&) { Base::PyException e; // extract the Python error text e.ReportException(); - } + } } void DocumentObserverPython::slotChangePropertyEditor(const App::Document &, const App::Property& Prop) diff --git a/src/App/DynamicProperty.cpp b/src/App/DynamicProperty.cpp index 6c11e0ad2d..7ad6419b33 100644 --- a/src/App/DynamicProperty.cpp +++ b/src/App/DynamicProperty.cpp @@ -172,7 +172,7 @@ Property* DynamicProperty::addDynamicProperty(PropertyContainer &pc, const char* if(prop && prop->getContainer()==&pc) FC_THROWM(Base::NameError, "Property " << pc.getFullName() << '.' << name << " already exists"); - if(Base::Tools::getIdentifier(name) != name) + if(Base::Tools::getIdentifier(name) != name) FC_THROWM(Base::NameError, "Invalid property name '" << name << "'"); Base::Type propType = Base::Type::getTypeIfDerivedFrom(type, App::Property::getClassTypeId(), true); diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index 4fbc8068b7..5463d0c7eb 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -909,7 +909,7 @@ ExpressionDeps Expression::getDeps(int option) const { } void Expression::getDepObjects( - std::map &deps, std::vector *labels) const + std::map &deps, std::vector *labels) const { for(auto &v : getIdentifiers()) { bool hidden = v.second; diff --git a/src/App/Expression.h b/src/App/Expression.h index eb71061917..4fa5877fa8 100644 --- a/src/App/Expression.h +++ b/src/App/Expression.h @@ -63,12 +63,12 @@ public: virtual App::PropertyLinkBase* getPropertyLink() {return nullptr;} protected: - void getIdentifiers(Expression &e, std::map &); + void getIdentifiers(Expression &e, std::map &); bool adjustLinks(Expression &e, const std::set &inList); bool relabeledDocument(Expression &e, const std::string &oldName, const std::string &newName); bool renameObjectIdentifier(Expression &e, const std::map &, const ObjectIdentifier &); - void collectReplacement(Expression &e, std::map &, + void collectReplacement(Expression &e, std::map &, const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const; bool updateElementReference(Expression &e, App::DocumentObject *feature,bool reverse); void importSubNames(Expression &e, const ObjectIdentifier::SubNameMap &subNameMap); diff --git a/src/App/MergeDocuments.h b/src/App/MergeDocuments.h index 1fed28a880..2f8568e98a 100644 --- a/src/App/MergeDocuments.h +++ b/src/App/MergeDocuments.h @@ -25,6 +25,7 @@ #define APP_MERGEDOCUMENTS_H #include +#include namespace zipios { class ZipInputStream; diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index 723f356288..2eef5db185 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -274,10 +274,10 @@ void PropertyVectorList::setValue(double x, double y, double z) PyObject *PropertyVectorList::getPyObject() { - PyObject* list = PyList_New( getSize() ); + PyObject* list = PyList_New(getSize()); - for (int i = 0;i