From 8a421b8e2e18e8b9ef6e2efb99c5d79b7f3be8d8 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 19 Oct 2018 22:25:55 +0200 Subject: [PATCH] improve whitespaces --- src/App/Document.h | 2 +- src/App/PropertyLinks.cpp | 32 ++++++++++++++++---------------- src/App/PropertyLinks.h | 18 +++++++++--------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/App/Document.h b/src/App/Document.h index 473bbcf5c5..504484dc5e 100644 --- a/src/App/Document.h +++ b/src/App/Document.h @@ -272,7 +272,7 @@ public: void setClosable(bool); /// check whether the document can be closed bool isClosable() const; - /// Recompute all touched features and return the amount of recalculated features + /// Recompute all touched features and return the number of recalculated features int recompute(); /// Recompute only one feature void recomputeFeature(DocumentObject* Feat); diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index 587047c456..b82f4b452e 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -50,9 +50,9 @@ using namespace std; // PropertyLink //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TYPESYSTEM_SOURCE(App::PropertyLink , App::Property) -TYPESYSTEM_SOURCE(App::PropertyLinkChild , App::PropertyLink) -TYPESYSTEM_SOURCE(App::PropertyLinkGlobal , App::PropertyLink) +TYPESYSTEM_SOURCE(App::PropertyLink, App::Property) +TYPESYSTEM_SOURCE(App::PropertyLinkChild, App::PropertyLink) +TYPESYSTEM_SOURCE(App::PropertyLinkGlobal, App::PropertyLink) //************************************************************************** // Construction/Destruction @@ -191,7 +191,7 @@ Property *PropertyLink::Copy(void) const void PropertyLink::Paste(const Property &from) { - if(!from.isDerivedFrom(PropertyLink::getClassTypeId())) + if (!from.isDerivedFrom(PropertyLink::getClassTypeId())) throw Base::TypeError("Incompatible property to paste to"); setValue(static_cast(from)._pcLink); @@ -202,8 +202,8 @@ void PropertyLink::Paste(const Property &from) //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TYPESYSTEM_SOURCE(App::PropertyLinkList, App::PropertyLists) -TYPESYSTEM_SOURCE(App::PropertyLinkListChild , App::PropertyLinkList) -TYPESYSTEM_SOURCE(App::PropertyLinkListGlobal , App::PropertyLinkList) +TYPESYSTEM_SOURCE(App::PropertyLinkListChild, App::PropertyLinkList) +TYPESYSTEM_SOURCE(App::PropertyLinkListGlobal, App::PropertyLinkList) //************************************************************************** // Construction/Destruction @@ -388,7 +388,7 @@ void PropertyLinkList::Restore(Base::XMLReader &reader) values.push_back(child); else if (reader.isVerbose()) Base::Console().Warning("Lost link to '%s' while loading, maybe " - "an object was not loaded correctly\n", name.c_str()); + "an object was not loaded correctly\n", name.c_str()); } reader.readEndElement("LinkList"); @@ -418,9 +418,9 @@ unsigned int PropertyLinkList::getMemSize(void) const // PropertyLinkSub //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TYPESYSTEM_SOURCE(App::PropertyLinkSub , App::Property) -TYPESYSTEM_SOURCE(App::PropertyLinkSubChild , App::PropertyLinkSub) -TYPESYSTEM_SOURCE(App::PropertyLinkSubGlobal , App::PropertyLinkSub) +TYPESYSTEM_SOURCE(App::PropertyLinkSub, App::Property) +TYPESYSTEM_SOURCE(App::PropertyLinkSubChild, App::PropertyLinkSub) +TYPESYSTEM_SOURCE(App::PropertyLinkSubGlobal, App::PropertyLinkSub) //************************************************************************** // Construction/Destruction @@ -524,7 +524,7 @@ void PropertyLinkSub::setPyObject(PyObject *value) Py::Sequence seq(value); if(seq.size() == 0) setValue(NULL); - else if (PyObject_TypeCheck(seq[0].ptr(), &(DocumentObjectPy::Type))){ + else if (PyObject_TypeCheck(seq[0].ptr(), &(DocumentObjectPy::Type))) { DocumentObjectPy *pcObj = (DocumentObjectPy*)seq[0].ptr(); if (seq[1].isString()) { std::vector vals; @@ -628,9 +628,9 @@ void PropertyLinkSub::Paste(const Property &from) // PropertyLinkSubList //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TYPESYSTEM_SOURCE(App::PropertyLinkSubList , App::PropertyLists) -TYPESYSTEM_SOURCE(App::PropertyLinkSubListChild , App::PropertyLinkSubList) -TYPESYSTEM_SOURCE(App::PropertyLinkSubListGlobal , App::PropertyLinkSubList) +TYPESYSTEM_SOURCE(App::PropertyLinkSubList, App::PropertyLists) +TYPESYSTEM_SOURCE(App::PropertyLinkSubListChild, App::PropertyLinkSubList) +TYPESYSTEM_SOURCE(App::PropertyLinkSubListGlobal, App::PropertyLinkSubList) //************************************************************************** // Construction/Destruction @@ -771,7 +771,7 @@ void PropertyLinkSubList::setValues(const std::vector& lValue,c void PropertyLinkSubList::setValue(DocumentObject* lValue, const std::vector &SubList) { -#ifndef USE_OLD_DAG +#ifndef USE_OLD_DAG //maintain backlinks. if (getContainer() && getContainer()->isDerivedFrom(App::DocumentObject::getClassTypeId())) { App::DocumentObject* parent = static_cast(getContainer()); @@ -938,7 +938,7 @@ PyObject *PropertyLinkSubList::getPyObject(void) #else Py::List sequence(count); #endif - for (unsigned int i = 0; igetPyObject()); std::string subItem; diff --git a/src/App/PropertyLinks.h b/src/App/PropertyLinks.h index 1ab7b1a34c..7b2ef25fcb 100644 --- a/src/App/PropertyLinks.h +++ b/src/App/PropertyLinks.h @@ -174,22 +174,22 @@ class AppExport PropertyLinkList : public PropertyLists, public ScopedLink public: /** - * A constructor. - * A more elaborate description of the constructor. - */ + * A constructor. + * A more elaborate description of the constructor. + */ PropertyLinkList(); /** - * A destructor. - * A more elaborate description of the destructor. - */ + * A destructor. + * A more elaborate description of the destructor. + */ virtual ~PropertyLinkList(); virtual void setSize(int newSize); virtual int getSize(void) const; /** Sets the property - */ + */ void setValue(DocumentObject*); void setValues(const std::vector&); @@ -248,7 +248,7 @@ public: * are stored as names, which can be resolved by the * ComplexGeoDataType interface to concrete sub objects. */ -class AppExport PropertyLinkSub: public Property, public ScopedLink +class AppExport PropertyLinkSub : public Property, public ScopedLink { TYPESYSTEM_HEADER(); @@ -326,7 +326,7 @@ public: PropertyLinkSubGlobal() {_pcScope = LinkScope::Global;}; }; -class AppExport PropertyLinkSubList: public PropertyLists, public ScopedLink +class AppExport PropertyLinkSubList : public PropertyLists, public ScopedLink { TYPESYSTEM_HEADER();