From b40de7a509b83627dcc9ead2c1ea3a91343938ae Mon Sep 17 00:00:00 2001 From: berniev Date: Sun, 31 Jul 2022 14:28:37 +1000 Subject: [PATCH] remove redundant void --- src/App/Annotation.h | 8 +- src/App/Application.cpp | 28 +-- src/App/Application.h | 46 ++--- src/App/Document.cpp | 18 +- src/App/Document.h | 24 +-- src/App/DocumentObject.cpp | 26 +-- src/App/DocumentObjectExtension.cpp | 6 +- src/App/DocumentObjectExtensionPyImp.cpp | 2 +- src/App/DocumentObjectFileIncluded.h | 4 +- src/App/DocumentObjectGroup.cpp | 6 +- src/App/DocumentObjectGroupPyImp.cpp | 2 +- src/App/DocumentObjectPyImp.cpp | 20 +-- src/App/DocumentPyImp.cpp | 40 ++--- src/App/Extension.cpp | 8 +- src/App/ExtensionContainerPyImp.cpp | 2 +- src/App/ExtensionPyImp.cpp | 2 +- src/App/FeatureCustom.h | 6 +- src/App/FeaturePython.cpp | 8 +- src/App/FeaturePython.h | 10 +- src/App/FeatureTest.h | 10 +- src/App/GeoFeature.cpp | 8 +- src/App/GeoFeature.h | 4 +- src/App/GeoFeatureGroupExtension.cpp | 4 +- src/App/GeoFeatureGroupExtension.h | 2 +- src/App/GeoFeatureGroupExtensionPyImp.cpp | 2 +- src/App/GeoFeaturePyImp.cpp | 2 +- src/App/GroupExtension.cpp | 4 +- src/App/GroupExtension.h | 6 +- src/App/GroupExtensionPyImp.cpp | 2 +- src/App/InventorObject.cpp | 2 +- src/App/InventorObject.h | 10 +- src/App/LinkBaseExtensionPyImp.cpp | 2 +- src/App/MaterialObject.cpp | 2 +- src/App/MaterialObject.h | 4 +- src/App/MaterialPyImp.cpp | 14 +- src/App/MeasureDistance.cpp | 2 +- src/App/MeasureDistance.h | 6 +- src/App/MergeDocuments.cpp | 2 +- src/App/MergeDocuments.h | 2 +- src/App/MetadataPyImp.cpp | 34 ++-- src/App/Origin.cpp | 8 +- src/App/Origin.h | 8 +- src/App/OriginFeature.h | 6 +- src/App/OriginGroupExtensionPyImp.cpp | 2 +- src/App/Part.cpp | 4 +- src/App/PartPyImp.cpp | 2 +- src/App/Path.cpp | 4 +- src/App/Path.h | 4 +- src/App/Placement.cpp | 6 +- src/App/Placement.h | 4 +- src/App/Property.cpp | 12 +- src/App/Property.h | 32 ++-- src/App/PropertyContainer.cpp | 16 +- src/App/PropertyContainer.h | 6 +- src/App/PropertyContainerPyImp.cpp | 4 +- src/App/PropertyExpressionEngine.cpp | 2 +- src/App/PropertyExpressionEngine.h | 6 +- src/App/PropertyFile.cpp | 2 +- src/App/PropertyFile.h | 4 +- src/App/PropertyGeo.cpp | 34 ++-- src/App/PropertyGeo.h | 54 +++--- src/App/PropertyLinks.cpp | 46 ++--- src/App/PropertyLinks.h | 72 ++++---- src/App/PropertyPythonObject.cpp | 6 +- src/App/PropertyPythonObject.h | 8 +- src/App/PropertyStandard.cpp | 6 +- src/App/PropertyStandard.h | 198 +++++++++++----------- src/App/PropertyUnits.cpp | 10 +- src/App/PropertyUnits.h | 46 ++--- src/App/TransactionalObject.cpp | 4 +- src/App/TransactionalObject.h | 2 +- src/App/Transactions.cpp | 8 +- src/App/Transactions.h | 10 +- src/App/VRMLObject.cpp | 2 +- src/App/VRMLObject.h | 10 +- 75 files changed, 519 insertions(+), 519 deletions(-) diff --git a/src/App/Annotation.h b/src/App/Annotation.h index 873f4a37c1..ab1da86fb8 100644 --- a/src/App/Annotation.h +++ b/src/App/Annotation.h @@ -38,14 +38,14 @@ class AppExport Annotation : public DocumentObject public: /// Constructor - Annotation(void); + Annotation(); virtual ~Annotation(); App::PropertyStringList LabelText; App::PropertyVector Position; /// returns the type name of the ViewProvider - const char* getViewProviderName(void) const { + const char* getViewProviderName() const { return "Gui::ViewProviderAnnotation"; } }; @@ -56,7 +56,7 @@ class AppExport AnnotationLabel : public DocumentObject public: /// Constructor - AnnotationLabel(void); + AnnotationLabel(); virtual ~AnnotationLabel(); App::PropertyStringList LabelText; @@ -64,7 +64,7 @@ public: App::PropertyVector TextPosition; /// returns the type name of the ViewProvider - const char* getViewProviderName(void) const { + const char* getViewProviderName() const { return "Gui::ViewProviderAnnotationLabel"; } }; diff --git a/src/App/Application.cpp b/src/App/Application.cpp index bfd98eafa9..0f6f269baa 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -530,7 +530,7 @@ bool Application::closeDocument(const char* name) return true; } -void Application::closeAllDocuments(void) +void Application::closeAllDocuments() { Base::FlagToggler flag(_isClosingAll); std::map::iterator pos; @@ -1000,7 +1000,7 @@ Document* Application::openDocumentPrivate(const char * FileName, } } -Document* Application::getActiveDocument(void) const +Document* Application::getActiveDocument() const { return _pActiveDoc; } @@ -1199,12 +1199,12 @@ bool Application::hasLinksTo(const DocumentObject *obj) const { return !getLinksTo(obj,0,1).empty(); } -ParameterManager & Application::GetSystemParameter(void) +ParameterManager & Application::GetSystemParameter() { return *_pcSysParamMngr; } -ParameterManager & Application::GetUserParameter(void) +ParameterManager & Application::GetUserParameter() { return *_pcUserParamMngr; } @@ -1218,7 +1218,7 @@ ParameterManager * Application::GetParameterSet(const char* sName) const return nullptr; } -const std::map & Application::GetParameterSetList(void) const +const std::map & Application::GetParameterSetList() const { return mpcPramManager; } @@ -1345,7 +1345,7 @@ std::vector Application::getImportTypes(const char* Module) const return types; } -std::vector Application::getImportTypes(void) const +std::vector Application::getImportTypes() const { std::vector types; for (std::vector::const_iterator it = _mImportTypes.begin(); it != _mImportTypes.end(); ++it) { @@ -1376,7 +1376,7 @@ std::map Application::getImportFilters(const char* Typ return moduleFilter; } -std::map Application::getImportFilters(void) const +std::map Application::getImportFilters() const { std::map filter; for (std::vector::const_iterator it = _mImportTypes.begin(); it != _mImportTypes.end(); ++it) { @@ -1468,7 +1468,7 @@ std::vector Application::getExportTypes(const char* Module) const return types; } -std::vector Application::getExportTypes(void) const +std::vector Application::getExportTypes() const { std::vector types; for (std::vector::const_iterator it = _mExportTypes.begin(); it != _mExportTypes.end(); ++it) { @@ -1499,7 +1499,7 @@ std::map Application::getExportFilters(const char* Typ return moduleFilter; } -std::map Application::getExportFilters(void) const +std::map Application::getExportFilters() const { std::map filter; for (std::vector::const_iterator it = _mExportTypes.begin(); it != _mExportTypes.end(); ++it) { @@ -1635,7 +1635,7 @@ void Application::cleanupUnits() } } -void Application::destruct(void) +void Application::destruct() { // saving system parameter Base::Console().Log("Saving system parameter...\n"); @@ -1685,7 +1685,7 @@ void Application::destruct(void) ParameterManager::Terminate(); } -void Application::destructObserver(void) +void Application::destructObserver() { if ( _pConsoleObserverFile ) { Base::Console().DetachObserver(_pConsoleObserverFile); @@ -2613,7 +2613,7 @@ void Application::SaveEnv(const char* s) mConfig[s] = c; } -void Application::initApplication(void) +void Application::initApplication() { // interpreter and Init script ========================================================== // register scripts @@ -2740,7 +2740,7 @@ std::list Application::processFiles(const std::list& f return processed; // successfully processed files } -void Application::processCmdLineFiles(void) +void Application::processCmdLineFiles() { // process files passed to command line std::list files = getCmdLineFiles(); @@ -2823,7 +2823,7 @@ void Application::logStatus() } } -void Application::LoadParameters(void) +void Application::LoadParameters() { // Init parameter sets =========================================================== // diff --git a/src/App/Application.h b/src/App/Application.h index 6b86d9b843..c9d5f1229d 100644 --- a/src/App/Application.h +++ b/src/App/Application.h @@ -119,7 +119,7 @@ public: std::vector *errs=nullptr, bool createView = true); /// Retrieve the active document - App::Document* getActiveDocument(void) const; + App::Document* getActiveDocument() const; /// Retrieve a named document App::Document* getDocument(const char *Name) const; @@ -157,7 +157,7 @@ public: void setActiveDocument(App::Document* pDoc); void setActiveDocument(const char *Name); /// close all documents (without saving) - void closeAllDocuments(void); + void closeAllDocuments(); /// Add pending document to open together with the current opening document int addPendingDocument(const char *FileName, const char *objName, bool allowPartial); /// Indicate whether the application is opening (restoring) some document @@ -311,9 +311,9 @@ public: /** @name methods for parameter handling */ //@{ /// returns the system parameter - ParameterManager & GetSystemParameter(void) ; + ParameterManager & GetSystemParameter() ; /// returns the user parameter - ParameterManager & GetUserParameter(void) ; + ParameterManager & GetUserParameter() ; /** Gets a parameter group by a full qualified path * It's an easy method to get a group: * \code @@ -326,7 +326,7 @@ public: Base::Reference GetParameterGroupByPath(const char* sName); ParameterManager * GetParameterSet(const char* sName) const; - const std::map & GetParameterSetList(void) const; + const std::map & GetParameterSetList() const; void AddParameterSet(const char* sName); void RemoveParameterSet(const char* sName); //@} @@ -354,11 +354,11 @@ public: /// Return a list of filetypes that are supported by a module. std::vector getImportTypes(const char* Module) const; /// Return a list of all filetypes. - std::vector getImportTypes(void) const; + std::vector getImportTypes() const; /// Return the import filters with modules of a given filetype. std::map getImportFilters(const char* Type) const; /// Return a list of all import filters. - std::map getImportFilters(void) const; + std::map getImportFilters() const; //@} //@{ /// Register an export filetype and a module name @@ -372,27 +372,27 @@ public: /// Return a list of filetypes that are supported by a module. std::vector getExportTypes(const char* Module) const; /// Return a list of all filetypes. - std::vector getExportTypes(void) const; + std::vector getExportTypes() const; /// Return the export filters with modules of a given filetype. std::map getExportFilters(const char* Type) const; /// Return a list of all export filters. - std::map getExportFilters(void) const; + std::map getExportFilters() const; //@} /** @name Init, Destruct an Access methods */ //@{ static void init(int argc, char ** argv); - static void initTypes(void); - static void destruct(void); - static void destructObserver(void); - static void processCmdLineFiles(void); + static void initTypes(); + static void destruct(); + static void destructObserver(); + static void processCmdLineFiles(); static std::list getCmdLineFiles(); static std::list processFiles(const std::list&); - static void runApplication(void); - friend Application &GetApplication(void); - static std::map &Config(void){return mConfig;} - static int GetARGC(void){return _argc;} - static char** GetARGV(void){return _argv;} + static void runApplication(); + friend Application &GetApplication(); + static std::map &Config(){return mConfig;} + static int GetARGC(){return _argc;} + static char** GetARGV(){return _argv;} //@} /** @name Application directories */ @@ -562,8 +562,8 @@ private: /** @name Private Init, Destruct an Access methods */ //@{ static void initConfig(int argc, char ** argv); - static void initApplication(void); - static void logStatus(void); + static void initApplication(); + static void logStatus(); // the one and only pointer to the application object static Application *_pcSingleton; /// checks if the environment is alright @@ -574,11 +574,11 @@ private: */ static std::string FindHomePath(const char* sCall); /// Print the help message - static void PrintInitHelp(void); + static void PrintInitHelp(); /// figure out some things static void ExtractUserPath(); /// load the user and system parameter set - static void LoadParameters(void); + static void LoadParameters(); /// puts the given env variable in the config static void SaveEnv(const char *); /// startup configuration container @@ -629,7 +629,7 @@ private: }; /// Singleton getter of the Application -inline App::Application &GetApplication(void){ +inline App::Application &GetApplication(){ return *App::Application::_pcSingleton; } diff --git a/src/App/Document.cpp b/src/App/Document.cpp index b881a00888..0331922736 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -938,7 +938,7 @@ void Document::exportGraphviz(std::ostream& out) const // return false; //} -bool Document::checkOnCycle(void) +bool Document::checkOnCycle() {/* std::vector < default_color_type > color(num_vertices(_DepList), white_color); graph_traits < DependencyList >::vertex_iterator vi, vi_end; @@ -1428,12 +1428,12 @@ void Document::setUndoMode(int iMode) d->iUndoMode = iMode; } -int Document::getUndoMode(void) const +int Document::getUndoMode() const { return d->iUndoMode; } -unsigned int Document::getUndoMemSize (void) const +unsigned int Document::getUndoMemSize () const { return d->UndoMemSize; } @@ -1448,7 +1448,7 @@ void Document::setMaxUndoStackSize(unsigned int UndoMaxStackSize) d->UndoMaxStackSize = UndoMaxStackSize; } -unsigned int Document::getMaxUndoStackSize(void)const +unsigned int Document::getMaxUndoStackSize()const { return d->UndoMaxStackSize; } @@ -2224,7 +2224,7 @@ Document::importObjects(Base::XMLReader& reader) return objs; } -unsigned int Document::getMemSize (void) const +unsigned int Document::getMemSize () const { unsigned int size = 0; @@ -2285,7 +2285,7 @@ bool Document::saveCopy(const char* _file) const } // Save the document under the name it has been opened -bool Document::save (void) +bool Document::save () { if(testStatus(Document::PartialDoc)) { FC_ERR("Partial loaded document '" << Label.getValue() << "' cannot be saved"); @@ -2974,7 +2974,7 @@ bool Document::isTouched() const return false; } -vector Document::getTouched(void) const +vector Document::getTouched() const { vector result; @@ -2995,7 +2995,7 @@ bool Document::isClosable() const return testStatus(Document::Closable); } -int Document::countObjects(void) const +int Document::countObjects() const { return static_cast(d->objectArray.size()); } @@ -4491,7 +4491,7 @@ DocumentObject* Document::moveObject(DocumentObject* obj, bool recursive) return objs.back(); } -DocumentObject * Document::getActiveObject(void) const +DocumentObject * Document::getActiveObject() const { return d->activeObject; } diff --git a/src/App/Document.h b/src/App/Document.h index 5148c53889..21bb8613f6 100644 --- a/src/App/Document.h +++ b/src/App/Document.h @@ -183,7 +183,7 @@ public: /// Save the Document under a new Name //void saveAs (const char* Name); /// Save the document to the file in Property Path - bool save (void); + bool save (); bool saveAs(const char* file); bool saveCopy(const char* file) const; /// Restore the document from the file in Property Path @@ -234,7 +234,7 @@ public: virtual void Restore(Base::XMLReader &reader) override; /// returns the complete document memory consumption, including all managed DocObjects and Undo Redo. - unsigned int getMemSize (void) const override; + unsigned int getMemSize () const override; /** @name Object handling */ //@{ @@ -289,7 +289,7 @@ public: */ DocumentObject* moveObject(DocumentObject* obj, bool recursive=false); /// Returns the active Object of this document - DocumentObject *getActiveObject(void) const; + DocumentObject *getActiveObject() const; /// Returns a Object of this document DocumentObject *getObject(const char *Name) const; /// Returns a Object of this document by its id @@ -314,7 +314,7 @@ public: template inline std::vector getObjectsOfType() const; int countObjectsOfType(const Base::Type& typeId) const; /// get the number of objects in the document - int countObjects(void) const; + int countObjects() const; //@} /** @name methods for modification and state handling @@ -323,11 +323,11 @@ public: /// Remove all modifications. After this call The document becomes Valid again. void purgeTouched(); /// check if there is any touched object in this document - bool isTouched(void) const; + bool isTouched() const; /// check if there is any object must execute in this document - bool mustExecute(void) const; + bool mustExecute() const; /// returns all touched objects - std::vector getTouched(void) const; + std::vector getTouched() const; /// set the document to be closable, this is on by default. void setClosable(bool); /// check whether the document can be closed @@ -370,7 +370,7 @@ public: /// switch the level of Undo/Redo void setUndoMode(int iMode); /// switch the level of Undo/Redo - int getUndoMode(void) const; + int getUndoMode() const; /// switch the transaction mode void setTransactionMode(int iMode); /** Open a new command Undo/Redo, an UTF-8 name can be specified @@ -398,11 +398,11 @@ public: /// Set the Undo limit in Byte! void setUndoLimit(unsigned int UndoMemSize=0); /// Returns the actual memory consumption of the Undo redo stuff. - unsigned int getUndoMemSize (void) const; + unsigned int getUndoMemSize () const; /// Set the Undo limit as stack size void setMaxUndoStackSize(unsigned int UndoMaxStackSize=20); /// Set the Undo limit as stack size - unsigned int getMaxUndoStackSize(void)const; + unsigned int getMaxUndoStackSize()const; /// Remove all stored Undos and Redos void clearUndos(); /// Returns the number of stored Undos. If greater than 0 Undo will be effective. @@ -428,7 +428,7 @@ public: /// write GraphViz file void writeDependencyGraphViz(std::ostream &out); /// checks if the graph is directed and has no cycles - bool checkOnCycle(void); + bool checkOnCycle(); /// get a list of all objects linking to the given object std::vector getInList(const DocumentObject* me) const; @@ -491,7 +491,7 @@ public: /// Function called to signal that an object identifier has been renamed void renameObjectIdentifiers(const std::map & paths, const std::function &selector = [](const App::DocumentObject *) { return true; }); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual std::string getFullName() const override; diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index b7cccf2880..90a7885120 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -62,7 +62,7 @@ DocumentObjectExecReturn *DocumentObject::StdReturn = nullptr; // DocumentObject //=========================================================================== -DocumentObject::DocumentObject(void) +DocumentObject::DocumentObject() : ExpressionEngine(),_pDoc(nullptr),pcNameInDocument(nullptr),_Id(0) { // define Label of type 'Output' to avoid being marked as touched after relabeling @@ -81,7 +81,7 @@ DocumentObject::DocumentObject(void) Visibility.setStatus(Property::NoModify,true); } -DocumentObject::~DocumentObject(void) +DocumentObject::~DocumentObject() { if (!PythonObject.is(Py::_None())){ Base::PyGILStateLocker lock; @@ -96,7 +96,7 @@ DocumentObject::~DocumentObject(void) } } -App::DocumentObjectExecReturn *DocumentObject::recompute(void) +App::DocumentObjectExecReturn *DocumentObject::recompute() { //check if the links are valid before making the recompute if(!GeoFeatureGroupExtension::areLinksValid(this)) { @@ -152,7 +152,7 @@ App::DocumentObjectExecReturn *DocumentObject::recompute(void) return ret; } -DocumentObjectExecReturn *DocumentObject::execute(void) +DocumentObjectExecReturn *DocumentObject::execute() { return executeExtensions(); } @@ -209,7 +209,7 @@ bool DocumentObject::isTouched() const * This can be useful to recompute the feature without * having to change one of its input properties. */ -void DocumentObject::enforceRecompute(void) +void DocumentObject::enforceRecompute() { touch(false); } @@ -220,7 +220,7 @@ void DocumentObject::enforceRecompute(void) * returns a value > 0. * @return true if document object must be recomputed, false if not. */ -bool DocumentObject::mustRecompute(void) const +bool DocumentObject::mustRecompute() const { if (StatusBits.test(ObjectStatus::Enforce)) return true; @@ -228,7 +228,7 @@ bool DocumentObject::mustRecompute(void) const return mustExecute() > 0; } -short DocumentObject::mustExecute(void) const +short DocumentObject::mustExecute() const { if (ExpressionEngine.isTouched()) return 1; @@ -243,7 +243,7 @@ short DocumentObject::mustExecute(void) const return 0; } -const char* DocumentObject::getStatusString(void) const +const char* DocumentObject::getStatusString() const { if (isError()) { const char* text = getDocument()->getErrorDescription(this); @@ -375,7 +375,7 @@ std::vector DocumentObject::getInList(void) const #else // ifndef USE_OLD_DAG -const std::vector &DocumentObject::getInList(void) const +const std::vector &DocumentObject::getInList() const { return _inList; } @@ -391,7 +391,7 @@ const std::vector &DocumentObject::getInList(void) const // of objects. And this may not be the worst case. getInListEx() has no such // problem. -std::vector DocumentObject::getInListRecursive(void) const { +std::vector DocumentObject::getInListRecursive() const { std::set inSet; std::vector res; getInListEx(inSet,true,&res); @@ -487,7 +487,7 @@ void _getOutListRecursive(std::set& objSet, } } -std::vector DocumentObject::getOutListRecursive(void) const +std::vector DocumentObject::getOutListRecursive() const { // number of objects in document is a good estimate in result size int maxDepth = GetApplication().checkLinkDepth(0); @@ -622,7 +622,7 @@ void DocumentObject::onLostLinkToObject(DocumentObject*) } -App::Document *DocumentObject::getDocument(void) const +App::Document *DocumentObject::getDocument() const { return _pDoc; } @@ -743,7 +743,7 @@ void DocumentObject::clearOutListCache() const { _outListCached = false; } -PyObject *DocumentObject::getPyObject(void) +PyObject *DocumentObject::getPyObject() { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 diff --git a/src/App/DocumentObjectExtension.cpp b/src/App/DocumentObjectExtension.cpp index fbfd650d9a..9492e3ff5c 100644 --- a/src/App/DocumentObjectExtension.cpp +++ b/src/App/DocumentObjectExtension.cpp @@ -42,12 +42,12 @@ DocumentObjectExtension::~DocumentObjectExtension() } -short int DocumentObjectExtension::extensionMustExecute(void) { +short int DocumentObjectExtension::extensionMustExecute() { return 0; } -App::DocumentObjectExecReturn* DocumentObjectExtension::extensionExecute(void) { +App::DocumentObjectExecReturn* DocumentObjectExtension::extensionExecute() { return App::DocumentObject::StdReturn; } @@ -68,7 +68,7 @@ void DocumentObjectExtension::onExtendedUnsetupObject() { } -PyObject* DocumentObjectExtension::getExtensionPyObject(void) { +PyObject* DocumentObjectExtension::getExtensionPyObject() { if (ExtensionPythonObject.is(Py::_None())){ // ref counter is set to 1 diff --git a/src/App/DocumentObjectExtensionPyImp.cpp b/src/App/DocumentObjectExtensionPyImp.cpp index c519707e67..deab8c77a4 100644 --- a/src/App/DocumentObjectExtensionPyImp.cpp +++ b/src/App/DocumentObjectExtensionPyImp.cpp @@ -30,7 +30,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string DocumentObjectExtensionPy::representation(void) const +std::string DocumentObjectExtensionPy::representation() const { return std::string(""); } diff --git a/src/App/DocumentObjectFileIncluded.h b/src/App/DocumentObjectFileIncluded.h index b68c3048d4..0dd4843729 100644 --- a/src/App/DocumentObjectFileIncluded.h +++ b/src/App/DocumentObjectFileIncluded.h @@ -37,12 +37,12 @@ class AppExport DocumentObjectFileIncluded : public DocumentObject public: /// Constructor - DocumentObjectFileIncluded(void); + DocumentObjectFileIncluded(); virtual ~DocumentObjectFileIncluded(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderDocumentObject"; } diff --git a/src/App/DocumentObjectGroup.cpp b/src/App/DocumentObjectGroup.cpp index 4a09427fd5..4b4d9f0e73 100644 --- a/src/App/DocumentObjectGroup.cpp +++ b/src/App/DocumentObjectGroup.cpp @@ -31,7 +31,7 @@ using namespace App; PROPERTY_SOURCE_WITH_EXTENSIONS(App::DocumentObjectGroup, App::DocumentObject) -DocumentObjectGroup::DocumentObjectGroup(void): DocumentObject(), GroupExtension() { +DocumentObjectGroup::DocumentObjectGroup(): DocumentObject(), GroupExtension() { GroupExtension::initExtension(this); _GroupTouched.setStatus(App::Property::Output,true); @@ -57,10 +57,10 @@ namespace App { /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(App::DocumentObjectGroupPython, App::DocumentObjectGroup) -template<> const char* App::DocumentObjectGroupPython::getViewProviderName(void) const { +template<> const char* App::DocumentObjectGroupPython::getViewProviderName() const { return "Gui::ViewProviderDocumentObjectGroupPython"; } -template<> PyObject* App::DocumentObjectGroupPython::getPyObject(void) { +template<> PyObject* App::DocumentObjectGroupPython::getPyObject() { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 PythonObject = Py::Object(new FeaturePythonPyT(this),true); diff --git a/src/App/DocumentObjectGroupPyImp.cpp b/src/App/DocumentObjectGroupPyImp.cpp index c08da1dfc3..15e23c1084 100644 --- a/src/App/DocumentObjectGroupPyImp.cpp +++ b/src/App/DocumentObjectGroupPyImp.cpp @@ -32,7 +32,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string DocumentObjectGroupPy::representation(void) const +std::string DocumentObjectGroupPy::representation() const { return std::string(""); } diff --git a/src/App/DocumentObjectPyImp.cpp b/src/App/DocumentObjectPyImp.cpp index b61edfd00a..bc1ab00426 100644 --- a/src/App/DocumentObjectPyImp.cpp +++ b/src/App/DocumentObjectPyImp.cpp @@ -40,7 +40,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string DocumentObjectPy::representation(void) const +std::string DocumentObjectPy::representation() const { DocumentObject* object = this->getDocumentObjectPtr(); std::stringstream str; @@ -48,7 +48,7 @@ std::string DocumentObjectPy::representation(void) const return str.str(); } -Py::String DocumentObjectPy::getName(void) const +Py::String DocumentObjectPy::getName() const { DocumentObject* object = this->getDocumentObjectPtr(); const char* internal = object->getNameInDocument(); @@ -58,12 +58,12 @@ Py::String DocumentObjectPy::getName(void) const return Py::String(std::string(internal)); } -Py::String DocumentObjectPy::getFullName(void) const +Py::String DocumentObjectPy::getFullName() const { return Py::String(getDocumentObjectPtr()->getFullName()); } -Py::Object DocumentObjectPy::getDocument(void) const +Py::Object DocumentObjectPy::getDocument() const { DocumentObject* object = this->getDocumentObjectPtr(); Document* doc = object->getDocument(); @@ -161,7 +161,7 @@ PyObject* DocumentObjectPy::enforceRecompute(PyObject * args) Py_Return; } -Py::List DocumentObjectPy::getState(void) const +Py::List DocumentObjectPy::getState() const { DocumentObject* object = this->getDocumentObjectPtr(); Py::List list; @@ -200,7 +200,7 @@ Py::List DocumentObjectPy::getState(void) const return list; } -Py::Object DocumentObjectPy::getViewObject(void) const +Py::Object DocumentObjectPy::getViewObject() const { try { PyObject *dict = PySys_GetObject("modules"); @@ -248,7 +248,7 @@ Py::Object DocumentObjectPy::getViewObject(void) const } } -Py::List DocumentObjectPy::getInList(void) const +Py::List DocumentObjectPy::getInList() const { Py::List ret; std::vector list = getDocumentObjectPtr()->getInList(); @@ -259,7 +259,7 @@ Py::List DocumentObjectPy::getInList(void) const return ret; } -Py::List DocumentObjectPy::getInListRecursive(void) const +Py::List DocumentObjectPy::getInListRecursive() const { Py::List ret; try { @@ -275,7 +275,7 @@ Py::List DocumentObjectPy::getInListRecursive(void) const return ret; } -Py::List DocumentObjectPy::getOutList(void) const +Py::List DocumentObjectPy::getOutList() const { Py::List ret; std::vector list = getDocumentObjectPtr()->getOutList(); @@ -286,7 +286,7 @@ Py::List DocumentObjectPy::getOutList(void) const return ret; } -Py::List DocumentObjectPy::getOutListRecursive(void) const +Py::List DocumentObjectPy::getOutListRecursive() const { Py::List ret; try { diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 94958a58f0..42613447ef 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -41,7 +41,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string DocumentPy::representation(void) const +std::string DocumentPy::representation() const { std::stringstream str; str << ""; @@ -644,7 +644,7 @@ PyObject* DocumentPy::findObjects(PyObject *args, PyObject *kwds) return list; } -Py::Object DocumentPy::getActiveObject(void) const +Py::Object DocumentPy::getActiveObject() const { DocumentObject *pcFtr = getDocumentPtr()->getActiveObject(); if (pcFtr) @@ -665,7 +665,7 @@ PyObject* DocumentPy::supportedTypes(PyObject *args) return Py::new_reference_to(res); } -Py::List DocumentPy::getObjects(void) const +Py::List DocumentPy::getObjects() const { std::vector objs = getDocumentPtr()->getObjects(); Py::List res; @@ -677,7 +677,7 @@ Py::List DocumentPy::getObjects(void) const return res; } -Py::List DocumentPy::getTopologicalSortedObjects(void) const +Py::List DocumentPy::getTopologicalSortedObjects() const { std::vector objs = getDocumentPtr()->topologicalSort(); Py::List res; @@ -689,7 +689,7 @@ Py::List DocumentPy::getTopologicalSortedObjects(void) const return res; } -Py::List DocumentPy::getRootObjects(void) const +Py::List DocumentPy::getRootObjects() const { std::vector objs = getDocumentPtr()->getRootObjects(); Py::List res; @@ -701,7 +701,7 @@ Py::List DocumentPy::getRootObjects(void) const return res; } -Py::Int DocumentPy::getUndoMode(void) const +Py::Int DocumentPy::getUndoMode() const { return Py::Int(getDocumentPtr()->getUndoMode()); } @@ -712,22 +712,22 @@ void DocumentPy::setUndoMode(Py::Int arg) } -Py::Int DocumentPy::getUndoRedoMemSize(void) const +Py::Int DocumentPy::getUndoRedoMemSize() const { return Py::Int((long)getDocumentPtr()->getUndoMemSize()); } -Py::Int DocumentPy::getUndoCount(void) const +Py::Int DocumentPy::getUndoCount() const { return Py::Int((long)getDocumentPtr()->getAvailableUndos()); } -Py::Int DocumentPy::getRedoCount(void) const +Py::Int DocumentPy::getRedoCount() const { return Py::Int((long)getDocumentPtr()->getAvailableRedos()); } -Py::List DocumentPy::getUndoNames(void) const +Py::List DocumentPy::getUndoNames() const { std::vector vList = getDocumentPtr()->getAvailableUndoNames(); Py::List res; @@ -738,7 +738,7 @@ Py::List DocumentPy::getUndoNames(void) const return res; } -Py::List DocumentPy::getRedoNames(void) const +Py::List DocumentPy::getRedoNames() const { std::vector vList = getDocumentPtr()->getAvailableRedoNames(); Py::List res; @@ -749,19 +749,19 @@ Py::List DocumentPy::getRedoNames(void) const return res; } -Py::String DocumentPy::getDependencyGraph(void) const +Py::String DocumentPy::getDependencyGraph() const { std::stringstream out; getDocumentPtr()->exportGraphviz(out); return Py::String(out.str()); } -Py::String DocumentPy::getName(void) const +Py::String DocumentPy::getName() const { return Py::String(getDocumentPtr()->getName()); } -Py::Boolean DocumentPy::getRecomputesFrozen(void) const +Py::Boolean DocumentPy::getRecomputesFrozen() const { return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::SkipRecompute)); } @@ -879,7 +879,7 @@ PyObject* DocumentPy::getLinksTo(PyObject *args) } PY_CATCH } -Py::List DocumentPy::getInList(void) const +Py::List DocumentPy::getInList() const { Py::List ret; auto lists = PropertyXLink::getDocumentInList(getDocumentPtr()); @@ -890,7 +890,7 @@ Py::List DocumentPy::getInList(void) const return ret; } -Py::List DocumentPy::getOutList(void) const +Py::List DocumentPy::getOutList() const { Py::List ret; auto lists = PropertyXLink::getDocumentOutList(getDocumentPtr()); @@ -914,22 +914,22 @@ PyObject *DocumentPy::getDependentDocuments(PyObject *args) { } PY_CATCH; } -Py::Boolean DocumentPy::getRestoring(void) const +Py::Boolean DocumentPy::getRestoring() const { return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::Restoring)); } -Py::Boolean DocumentPy::getPartial(void) const +Py::Boolean DocumentPy::getPartial() const { return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::PartialDoc)); } -Py::Boolean DocumentPy::getImporting(void) const +Py::Boolean DocumentPy::getImporting() const { return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::Importing)); } -Py::Boolean DocumentPy::getRecomputing(void) const +Py::Boolean DocumentPy::getRecomputing() const { return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::Recomputing)); } diff --git a/src/App/Extension.cpp b/src/App/Extension.cpp index ba30561c95..fdbbe695e9 100644 --- a/src/App/Extension.cpp +++ b/src/App/Extension.cpp @@ -39,10 +39,10 @@ * PropertyData in the extension chain, there is no parent property data. */ EXTENSION_TYPESYSTEM_SOURCE_P(App::Extension) -const App::PropertyData * App::Extension::extensionGetPropertyDataPtr(void){return &propertyData;} -const App::PropertyData & App::Extension::extensionGetPropertyData(void) const{return propertyData;} +const App::PropertyData * App::Extension::extensionGetPropertyDataPtr(){return &propertyData;} +const App::PropertyData & App::Extension::extensionGetPropertyData() const{return propertyData;} App::PropertyData App::Extension::propertyData; -void App::Extension::init(void){ +void App::Extension::init(){ assert(Extension::classTypeId == Base::Type::badType() && "don't init() twice!"); @@ -95,7 +95,7 @@ void Extension::initExtension(ExtensionContainer* obj) { } -PyObject* Extension::getExtensionPyObject(void) { +PyObject* Extension::getExtensionPyObject() { if (ExtensionPythonObject.is(Py::_None())){ // ref counter is set to 1 diff --git a/src/App/ExtensionContainerPyImp.cpp b/src/App/ExtensionContainerPyImp.cpp index 6a93b0ad77..2ddb0b4cca 100644 --- a/src/App/ExtensionContainerPyImp.cpp +++ b/src/App/ExtensionContainerPyImp.cpp @@ -36,7 +36,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string ExtensionContainerPy::representation(void) const +std::string ExtensionContainerPy::representation() const { return std::string(""); } diff --git a/src/App/ExtensionPyImp.cpp b/src/App/ExtensionPyImp.cpp index 059e7ea2a1..03d5ec308a 100644 --- a/src/App/ExtensionPyImp.cpp +++ b/src/App/ExtensionPyImp.cpp @@ -32,7 +32,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string ExtensionPy::representation(void) const +std::string ExtensionPy::representation() const { return std::string(""); } diff --git a/src/App/FeatureCustom.h b/src/App/FeatureCustom.h index ad8c49cec8..d497dc9a88 100644 --- a/src/App/FeatureCustom.h +++ b/src/App/FeatureCustom.h @@ -57,15 +57,15 @@ public: return FeatureT::mustExecute(); } /// recalculate the Feature - virtual DocumentObjectExecReturn *execute(void) { + virtual DocumentObjectExecReturn *execute() { return FeatureT::execute(); } /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return FeatureT::getViewProviderName(); } - PyObject *getPyObject(void) { + PyObject *getPyObject() { return FeatureT::getPyObject(); } void setPyObject(PyObject *obj) { diff --git a/src/App/FeaturePython.cpp b/src/App/FeaturePython.cpp index 1baffbdc14..646e1a599e 100644 --- a/src/App/FeaturePython.cpp +++ b/src/App/FeaturePython.cpp @@ -374,7 +374,7 @@ bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse, } } -PyObject *FeaturePythonImp::getPyObject(void) +PyObject *FeaturePythonImp::getPyObject() { // ref counter is set to 1 return new FeaturePythonPyT(object); @@ -584,10 +584,10 @@ bool FeaturePythonImp::editProperty(const char *name) namespace App { PROPERTY_SOURCE_TEMPLATE(App::FeaturePython, App::DocumentObject) -template<> const char* App::FeaturePython::getViewProviderName(void) const { +template<> const char* App::FeaturePython::getViewProviderName() const { return "Gui::ViewProviderPythonFeature"; } -template<> PyObject* App::FeaturePython::getPyObject(void) { +template<> PyObject* App::FeaturePython::getPyObject() { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 PythonObject = Py::Object(new FeaturePythonPyT(this),true); @@ -602,7 +602,7 @@ template class AppExport FeaturePythonT; namespace App { PROPERTY_SOURCE_TEMPLATE(App::GeometryPython, App::GeoFeature) -template<> const char* App::GeometryPython::getViewProviderName(void) const { +template<> const char* App::GeometryPython::getViewProviderName() const { return "Gui::ViewProviderPythonGeometry"; } // explicit template instantiation diff --git a/src/App/FeaturePython.h b/src/App/FeaturePython.h index ec8a0efbf1..d90be211b3 100644 --- a/src/App/FeaturePython.h +++ b/src/App/FeaturePython.h @@ -54,7 +54,7 @@ public: void onChanged(const Property* prop); void onDocumentRestored(); std::string getViewProviderName(); - PyObject *getPyObject(void); + PyObject *getPyObject(); bool getSubObject(App::DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const; @@ -187,7 +187,7 @@ public: return imp->mustExecute()?1:0; } /// recalculate the Feature - virtual DocumentObjectExecReturn *execute(void) override { + virtual DocumentObjectExecReturn *execute() override { try { bool handled = imp->execute(); if (!handled) @@ -198,14 +198,14 @@ public: } return DocumentObject::StdReturn; } - virtual const char* getViewProviderNameOverride(void) const override { + virtual const char* getViewProviderNameOverride() const override { viewProviderName = imp->getViewProviderName(); if(viewProviderName.size()) return viewProviderName.c_str(); return FeatureT::getViewProviderNameOverride(); } /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const override { + virtual const char* getViewProviderName() const override { return FeatureT::getViewProviderName(); //return "Gui::ViewProviderPythonFeature"; } @@ -308,7 +308,7 @@ public: FeatureT::editProperty(propName); } - PyObject *getPyObject(void) override { + PyObject *getPyObject() override { if (FeatureT::PythonObject.is(Py::_None())) { // ref counter is set to 1 FeatureT::PythonObject = Py::Object(imp->getPyObject(),true); diff --git a/src/App/FeatureTest.h b/src/App/FeatureTest.h index 51ca4b3808..111e2f0590 100644 --- a/src/App/FeatureTest.h +++ b/src/App/FeatureTest.h @@ -104,12 +104,12 @@ public: /** @name methods override Feature */ //@{ - virtual short mustExecute(void) const; + virtual short mustExecute() const; /// recalculate the Feature - virtual DocumentObjectExecReturn *execute(void); + virtual DocumentObjectExecReturn *execute(); /// returns the type name of the ViewProvider //Hint: Probably it makes sense to have a view provider for unittests (e.g. Gui::ViewProviderTest) - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderFeature"; } //@} @@ -127,9 +127,9 @@ public: App::PropertyInteger ExceptionType; /// recalculate the Feature and throw an exception - virtual DocumentObjectExecReturn *execute(void); + virtual DocumentObjectExecReturn *execute(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderFeature"; } }; diff --git a/src/App/GeoFeature.cpp b/src/App/GeoFeature.cpp index 0015d545d0..8be48a9c7f 100644 --- a/src/App/GeoFeature.cpp +++ b/src/App/GeoFeature.cpp @@ -40,12 +40,12 @@ PROPERTY_SOURCE(App::GeoFeature, App::DocumentObject) // Feature //=========================================================================== -GeoFeature::GeoFeature(void) +GeoFeature::GeoFeature() { ADD_PROPERTY_TYPE(Placement,(Base::Placement()),nullptr,Prop_NoRecompute,nullptr); } -GeoFeature::~GeoFeature(void) +GeoFeature::~GeoFeature() { } @@ -71,7 +71,7 @@ const PropertyComplexGeoData* GeoFeature::getPropertyOfGeometry() const return nullptr; } -PyObject* GeoFeature::getPyObject(void) +PyObject* GeoFeature::getPyObject() { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 @@ -87,7 +87,7 @@ std::pair GeoFeature::getElementName( (void)type; std::pair ret; - if(!name) + if(!name) return ret; ret.second = name; diff --git a/src/App/GeoFeature.h b/src/App/GeoFeature.h index c9d79dda58..16590395fd 100644 --- a/src/App/GeoFeature.h +++ b/src/App/GeoFeature.h @@ -42,7 +42,7 @@ public: PropertyPlacement Placement; /// Constructor - GeoFeature(void); + GeoFeature(); virtual ~GeoFeature(); /** @@ -64,7 +64,7 @@ public: * @brief getPyObject returns the Python binding object * @return the Python binding object */ - virtual PyObject* getPyObject(void); + virtual PyObject* getPyObject(); /// Specify the type of element name to return when calling getElementName() enum ElementNameType { diff --git a/src/App/GeoFeatureGroupExtension.cpp b/src/App/GeoFeatureGroupExtension.cpp index 22ec309c39..68ca65a322 100644 --- a/src/App/GeoFeatureGroupExtension.cpp +++ b/src/App/GeoFeatureGroupExtension.cpp @@ -44,13 +44,13 @@ EXTENSION_PROPERTY_SOURCE(App::GeoFeatureGroupExtension, App::GroupExtension) // Feature //=========================================================================== -GeoFeatureGroupExtension::GeoFeatureGroupExtension(void) +GeoFeatureGroupExtension::GeoFeatureGroupExtension() { initExtensionType(GeoFeatureGroupExtension::getExtensionClassTypeId()); Group.setScope(LinkScope::Child); } -GeoFeatureGroupExtension::~GeoFeatureGroupExtension(void) +GeoFeatureGroupExtension::~GeoFeatureGroupExtension() { } diff --git a/src/App/GeoFeatureGroupExtension.h b/src/App/GeoFeatureGroupExtension.h index 470167d419..448e7cb309 100644 --- a/src/App/GeoFeatureGroupExtension.h +++ b/src/App/GeoFeatureGroupExtension.h @@ -67,7 +67,7 @@ public: virtual void transformPlacement(const Base::Placement &transform); /// Constructor - GeoFeatureGroupExtension(void); + GeoFeatureGroupExtension(); virtual ~GeoFeatureGroupExtension(); virtual void extensionOnChanged(const Property* p) override; diff --git a/src/App/GeoFeatureGroupExtensionPyImp.cpp b/src/App/GeoFeatureGroupExtensionPyImp.cpp index 7d0dde7432..884886af51 100644 --- a/src/App/GeoFeatureGroupExtensionPyImp.cpp +++ b/src/App/GeoFeatureGroupExtensionPyImp.cpp @@ -31,7 +31,7 @@ using namespace App; // returns a string which represents the object e.g. when printed in python -std::string GeoFeatureGroupExtensionPy::representation(void) const +std::string GeoFeatureGroupExtensionPy::representation() const { return std::string(""); } diff --git a/src/App/GeoFeaturePyImp.cpp b/src/App/GeoFeaturePyImp.cpp index 8fe282131d..c5b341bafe 100644 --- a/src/App/GeoFeaturePyImp.cpp +++ b/src/App/GeoFeaturePyImp.cpp @@ -32,7 +32,7 @@ using namespace App; // returns a string which represents the object e.g. when printed in python -std::string GeoFeaturePy::representation(void) const +std::string GeoFeaturePy::representation() const { return std::string(""); } diff --git a/src/App/GroupExtension.cpp b/src/App/GroupExtension.cpp index 2a0bae34ea..902deebc8f 100644 --- a/src/App/GroupExtension.cpp +++ b/src/App/GroupExtension.cpp @@ -297,7 +297,7 @@ DocumentObject* GroupExtension::getGroupOfObject(const DocumentObject* obj) return nullptr; } -PyObject* GroupExtension::getExtensionPyObject(void) { +PyObject* GroupExtension::getExtensionPyObject() { if (ExtensionPythonObject.is(Py::_None())){ // ref counter is set to 1 @@ -396,7 +396,7 @@ bool GroupExtension::extensionGetSubObjects(std::vector &ret, int) return true; } -App::DocumentObjectExecReturn *GroupExtension::extensionExecute(void) { +App::DocumentObjectExecReturn *GroupExtension::extensionExecute() { // This touch property is for propagating changes to upper group _GroupTouched.touch(); return inherited::extensionExecute(); diff --git a/src/App/GroupExtension.h b/src/App/GroupExtension.h index 47a301cce9..aa728669d6 100644 --- a/src/App/GroupExtension.h +++ b/src/App/GroupExtension.h @@ -42,7 +42,7 @@ class AppExport GroupExtension : public DocumentObjectExtension public: /// Constructor - GroupExtension(void); + GroupExtension(); virtual ~GroupExtension(); /** @name Object handling */ @@ -107,7 +107,7 @@ public: static DocumentObject* getGroupOfObject(const DocumentObject* obj); //@} - virtual PyObject* getExtensionPyObject(void) override; + virtual PyObject* getExtensionPyObject() override; virtual void extensionOnChanged(const Property* p) override; @@ -116,7 +116,7 @@ public: virtual bool extensionGetSubObjects(std::vector &ret, int reason) const override; - virtual App::DocumentObjectExecReturn *extensionExecute(void) override; + virtual App::DocumentObjectExecReturn *extensionExecute() override; std::vector getAllChildren() const; void getAllChildren(std::vector &, std::set &) const; diff --git a/src/App/GroupExtensionPyImp.cpp b/src/App/GroupExtensionPyImp.cpp index f4fd6f6ecd..62d4aea805 100644 --- a/src/App/GroupExtensionPyImp.cpp +++ b/src/App/GroupExtensionPyImp.cpp @@ -34,7 +34,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string GroupExtensionPy::representation(void) const +std::string GroupExtensionPy::representation() const { return std::string(""); } diff --git a/src/App/InventorObject.cpp b/src/App/InventorObject.cpp index a005c6d4ef..b9827ac44a 100644 --- a/src/App/InventorObject.cpp +++ b/src/App/InventorObject.cpp @@ -42,7 +42,7 @@ InventorObject::~InventorObject() { } -short InventorObject::mustExecute(void) const +short InventorObject::mustExecute() const { return 0; } diff --git a/src/App/InventorObject.h b/src/App/InventorObject.h index e2823e6eb0..89b01064b9 100644 --- a/src/App/InventorObject.h +++ b/src/App/InventorObject.h @@ -37,18 +37,18 @@ class AppExport InventorObject : public GeoFeature public: /// Constructor - InventorObject(void); + InventorObject(); virtual ~InventorObject(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderInventorObject"; } - virtual DocumentObjectExecReturn *execute(void) { + virtual DocumentObjectExecReturn *execute() { return DocumentObject::StdReturn; } - virtual short mustExecute(void) const; - virtual PyObject *getPyObject(void); + virtual short mustExecute() const; + virtual PyObject *getPyObject(); PropertyString Buffer; PropertyString FileName; diff --git a/src/App/LinkBaseExtensionPyImp.cpp b/src/App/LinkBaseExtensionPyImp.cpp index 8fcddb3fb4..f84ff7a7bb 100644 --- a/src/App/LinkBaseExtensionPyImp.cpp +++ b/src/App/LinkBaseExtensionPyImp.cpp @@ -33,7 +33,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string LinkBaseExtensionPy::representation(void) const +std::string LinkBaseExtensionPy::representation() const { std::ostringstream str; str << "<" << getLinkBaseExtensionPtr()->getExtensionClassTypeId().getName() << ">"; diff --git a/src/App/MaterialObject.cpp b/src/App/MaterialObject.cpp index d4e413db2c..5a8bbb3f7e 100644 --- a/src/App/MaterialObject.cpp +++ b/src/App/MaterialObject.cpp @@ -46,7 +46,7 @@ MaterialObject::~MaterialObject() namespace App { /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(App::MaterialObjectPython, App::MaterialObject) -template<> const char* App::MaterialObjectPython::getViewProviderName(void) const { +template<> const char* App::MaterialObjectPython::getViewProviderName() const { return "Gui::ViewProviderMaterialObjectPython"; } /// @endcond diff --git a/src/App/MaterialObject.h b/src/App/MaterialObject.h index 28da817109..bc5d68c1ab 100644 --- a/src/App/MaterialObject.h +++ b/src/App/MaterialObject.h @@ -37,14 +37,14 @@ class AppExport MaterialObject : public DocumentObject public: /// Constructor - MaterialObject(void); + MaterialObject(); virtual ~MaterialObject(); App::PropertyMap Material; /// returns the type name of the ViewProvider - const char* getViewProviderName(void) const { + const char* getViewProviderName() const { return "Gui::ViewProviderMaterialObject"; } diff --git a/src/App/MaterialPyImp.cpp b/src/App/MaterialPyImp.cpp index a4a5a8c60f..41a3600505 100644 --- a/src/App/MaterialPyImp.cpp +++ b/src/App/MaterialPyImp.cpp @@ -78,7 +78,7 @@ int MaterialPy::PyInit(PyObject* args, PyObject* kwds) } // returns a string which represents the object e.g. when printed in python -std::string MaterialPy::representation(void) const +std::string MaterialPy::representation() const { return std::string(""); } @@ -94,7 +94,7 @@ PyObject* MaterialPy::set(PyObject * args) Py_Return; } -Py::Tuple MaterialPy::getAmbientColor(void) const +Py::Tuple MaterialPy::getAmbientColor() const { Py::Tuple tuple(4); tuple.setItem(0, Py::Float(getMaterialPtr()->ambientColor.r)); @@ -115,7 +115,7 @@ void MaterialPy::setAmbientColor(Py::Tuple arg) getMaterialPtr()->ambientColor = c; } -Py::Tuple MaterialPy::getDiffuseColor(void) const +Py::Tuple MaterialPy::getDiffuseColor() const { Py::Tuple tuple(4); tuple.setItem(0, Py::Float(getMaterialPtr()->diffuseColor.r)); @@ -136,7 +136,7 @@ void MaterialPy::setDiffuseColor(Py::Tuple arg) getMaterialPtr()->diffuseColor = c; } -Py::Tuple MaterialPy::getEmissiveColor(void) const +Py::Tuple MaterialPy::getEmissiveColor() const { Py::Tuple tuple(4); tuple.setItem(0, Py::Float(getMaterialPtr()->emissiveColor.r)); @@ -157,7 +157,7 @@ void MaterialPy::setEmissiveColor(Py::Tuple arg) getMaterialPtr()->emissiveColor = c; } -Py::Tuple MaterialPy::getSpecularColor(void) const +Py::Tuple MaterialPy::getSpecularColor() const { Py::Tuple tuple(4); tuple.setItem(0, Py::Float(getMaterialPtr()->specularColor.r)); @@ -178,7 +178,7 @@ void MaterialPy::setSpecularColor(Py::Tuple arg) getMaterialPtr()->specularColor = c; } -Py::Float MaterialPy::getShininess(void) const +Py::Float MaterialPy::getShininess() const { return Py::Float(getMaterialPtr()->shininess); } @@ -188,7 +188,7 @@ void MaterialPy::setShininess(Py::Float arg) getMaterialPtr()->shininess = (float)arg; } -Py::Float MaterialPy::getTransparency(void) const +Py::Float MaterialPy::getTransparency() const { return Py::Float(getMaterialPtr()->transparency); } diff --git a/src/App/MeasureDistance.cpp b/src/App/MeasureDistance.cpp index 8132075eaf..05af0a213e 100644 --- a/src/App/MeasureDistance.cpp +++ b/src/App/MeasureDistance.cpp @@ -43,7 +43,7 @@ MeasureDistance::~MeasureDistance() { } -DocumentObjectExecReturn *MeasureDistance::execute(void) +DocumentObjectExecReturn *MeasureDistance::execute() { Distance.setValue(Base::Distance(P1.getValue(), P2.getValue())); return DocumentObject::StdReturn; diff --git a/src/App/MeasureDistance.h b/src/App/MeasureDistance.h index 47e1e18f8d..8c26695818 100644 --- a/src/App/MeasureDistance.h +++ b/src/App/MeasureDistance.h @@ -38,7 +38,7 @@ class AppExport MeasureDistance : public DocumentObject public: /// Constructor - MeasureDistance(void); + MeasureDistance(); virtual ~MeasureDistance(); App::PropertyVector P1; @@ -46,10 +46,10 @@ public: App::PropertyDistance Distance; /// recalculate the object - virtual DocumentObjectExecReturn *execute(void); + virtual DocumentObjectExecReturn *execute(); /// returns the type name of the ViewProvider - const char* getViewProviderName(void) const { + const char* getViewProviderName() const { return "Gui::ViewProviderMeasureDistance"; } diff --git a/src/App/MergeDocuments.cpp b/src/App/MergeDocuments.cpp index 842edd1c46..6c0467d635 100644 --- a/src/App/MergeDocuments.cpp +++ b/src/App/MergeDocuments.cpp @@ -90,7 +90,7 @@ MergeDocuments::~MergeDocuments() connectImport.disconnect(); } -unsigned int MergeDocuments::getMemSize (void) const +unsigned int MergeDocuments::getMemSize () const { return 0; } diff --git a/src/App/MergeDocuments.h b/src/App/MergeDocuments.h index a33e5594b7..3ddf342e2b 100644 --- a/src/App/MergeDocuments.h +++ b/src/App/MergeDocuments.h @@ -40,7 +40,7 @@ public: ~MergeDocuments(); bool isVerbose() const { return verbose; } void setVerbose(bool on) { verbose = on; } - unsigned int getMemSize (void) const; + unsigned int getMemSize () const; std::vector importObjects(std::istream&); void importObject(const std::vector& o, Base::XMLReader & r); void exportObject(const std::vector& o, Base::Writer & w); diff --git a/src/App/MetadataPyImp.cpp b/src/App/MetadataPyImp.cpp index 3a35d42d22..7651068a94 100644 --- a/src/App/MetadataPyImp.cpp +++ b/src/App/MetadataPyImp.cpp @@ -33,7 +33,7 @@ using namespace Base; XERCES_CPP_NAMESPACE_USE // Returns a string which represents the object e.g. when printed in Python -std::string MetadataPy::representation(void) const +std::string MetadataPy::representation() const { MetadataPy::PointerType ptr = getMetadataPtr(); std::stringstream str; @@ -112,22 +112,22 @@ int MetadataPy::PyInit(PyObject* args, PyObject* /*kwd*/) return -1; } -Py::Object MetadataPy::getName(void) const +Py::Object MetadataPy::getName() const { return Py::String(getMetadataPtr()->name()); } -Py::Object MetadataPy::getVersion(void) const +Py::Object MetadataPy::getVersion() const { return Py::String(getMetadataPtr()->version().str()); } -Py::Object MetadataPy::getDescription(void) const +Py::Object MetadataPy::getDescription() const { return Py::String(getMetadataPtr()->description()); } -Py::Object MetadataPy::getMaintainer(void) const +Py::Object MetadataPy::getMaintainer() const { auto maintainers = getMetadataPtr()->maintainer(); Py::List pyMaintainers; @@ -140,7 +140,7 @@ Py::Object MetadataPy::getMaintainer(void) const return pyMaintainers; } -Py::Object MetadataPy::getAuthor(void) const +Py::Object MetadataPy::getAuthor() const { auto authors = getMetadataPtr()->author(); Py::List pyAuthors; @@ -153,7 +153,7 @@ Py::Object MetadataPy::getAuthor(void) const return pyAuthors; } -Py::Object MetadataPy::getLicense(void) const +Py::Object MetadataPy::getLicense() const { auto licenses = getMetadataPtr()->license(); Py::List pyLicenses; @@ -166,7 +166,7 @@ Py::Object MetadataPy::getLicense(void) const return pyLicenses; } -Py::Object MetadataPy::getUrls(void) const +Py::Object MetadataPy::getUrls() const { auto urls = getMetadataPtr()->url (); Py::List pyUrls; @@ -200,7 +200,7 @@ Py::Object dependencyToPyObject(const Meta::Dependency& d) return pyDependency; } -Py::Object MetadataPy::getDepend(void) const +Py::Object MetadataPy::getDepend() const { auto dependencies = getMetadataPtr()->depend(); Py::List pyDependencies; @@ -210,7 +210,7 @@ Py::Object MetadataPy::getDepend(void) const return pyDependencies; } -Py::Object MetadataPy::getConflict(void) const +Py::Object MetadataPy::getConflict() const { auto dependencies = getMetadataPtr()->conflict(); Py::List pyDependencies; @@ -220,7 +220,7 @@ Py::Object MetadataPy::getConflict(void) const return pyDependencies; } -Py::Object MetadataPy::getReplace(void) const +Py::Object MetadataPy::getReplace() const { auto dependencies = getMetadataPtr()->replace(); Py::List pyDependencies; @@ -232,7 +232,7 @@ Py::Object MetadataPy::getReplace(void) const // Tag, icon, classname, file -Py::Object MetadataPy::getTag(void) const +Py::Object MetadataPy::getTag() const { auto tags = getMetadataPtr()->tag(); Py::List pyTags; @@ -242,22 +242,22 @@ Py::Object MetadataPy::getTag(void) const return pyTags; } -Py::Object MetadataPy::getIcon(void) const +Py::Object MetadataPy::getIcon() const { return Py::String(getMetadataPtr()->icon().string()); } -Py::Object MetadataPy::getClassname(void) const +Py::Object MetadataPy::getClassname() const { return Py::String(getMetadataPtr()->classname()); } -Py::Object MetadataPy::getSubdirectory(void) const +Py::Object MetadataPy::getSubdirectory() const { return Py::String(getMetadataPtr()->subdirectory().string()); } -Py::Object MetadataPy::getFile(void) const +Py::Object MetadataPy::getFile() const { auto files = getMetadataPtr()->file(); Py::List pyFiles; @@ -267,7 +267,7 @@ Py::Object MetadataPy::getFile(void) const return pyFiles; } -Py::Object MetadataPy::getContent(void) const +Py::Object MetadataPy::getContent() const { auto content = getMetadataPtr()->content(); std::set keys; diff --git a/src/App/Origin.cpp b/src/App/Origin.cpp index 2d98938eb1..b3712298df 100644 --- a/src/App/Origin.cpp +++ b/src/App/Origin.cpp @@ -48,7 +48,7 @@ PROPERTY_SOURCE(App::Origin, App::DocumentObject) const char* Origin::AxisRoles[3] = {"X_Axis", "Y_Axis", "Z_Axis"}; const char* Origin::PlaneRoles[3] = {"XY_Plane", "XZ_Plane", "YZ_Plane"}; -Origin::Origin(void) : extension(this) { +Origin::Origin() : extension(this) { ADD_PROPERTY_TYPE ( OriginFeatures, (nullptr), 0, App::Prop_Hidden, "Axis and baseplanes controlled by the origin" ); @@ -57,7 +57,7 @@ Origin::Origin(void) : extension(this) { } -Origin::~Origin(void) +Origin::~Origin() { } App::OriginFeature *Origin::getOriginFeature( const char *role) const { @@ -107,7 +107,7 @@ bool Origin::hasObject (const DocumentObject *obj) const { return std::find (features.begin(), features.end(), obj) != features.end (); } -short Origin::mustExecute(void) const { +short Origin::mustExecute() const { if (OriginFeatures.isTouched ()) { return 1; } else { @@ -115,7 +115,7 @@ short Origin::mustExecute(void) const { } } -App::DocumentObjectExecReturn *Origin::execute(void) { +App::DocumentObjectExecReturn *Origin::execute() { try { // try to find all base axis and planes in the origin for (const char* role: AxisRoles) { App::Line *axis = getAxis (role); diff --git a/src/App/Origin.h b/src/App/Origin.h index 4b51a4bd6b..5dfb0f124f 100644 --- a/src/App/Origin.h +++ b/src/App/Origin.h @@ -40,11 +40,11 @@ class AppExport Origin : public App::DocumentObject public: /// Constructor - Origin(void); + Origin(); virtual ~Origin(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderOrigin"; } @@ -112,7 +112,7 @@ public: static Base::BoundBox3d defaultBoundBox(); /// Returns true on changing OriginFeature set - virtual short mustExecute(void) const; + virtual short mustExecute() const; /// Axis types static const char* AxisRoles[3]; @@ -124,7 +124,7 @@ public: protected: /// Checks integrity of the Origin - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn *execute(); /// Creates all corresponding Axes and Planes objects for the origin if they aren't linked yet virtual void setupObject (); /// Removes all planes and axis if they are still linked to the document diff --git a/src/App/OriginFeature.h b/src/App/OriginFeature.h index 3caf425d75..b95e715e47 100644 --- a/src/App/OriginFeature.h +++ b/src/App/OriginFeature.h @@ -41,7 +41,7 @@ public: PropertyString Role; /// Constructor - OriginFeature(void); + OriginFeature(); virtual ~OriginFeature(); /// Finds the origin object this plane belongs to @@ -51,7 +51,7 @@ public: class AppExport Plane: public App::OriginFeature { PROPERTY_HEADER(App::OriginFeature); public: - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderPlane"; } }; @@ -59,7 +59,7 @@ public: class AppExport Line: public App::OriginFeature { PROPERTY_HEADER(App::OriginFeature); public: - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderLine"; } }; diff --git a/src/App/OriginGroupExtensionPyImp.cpp b/src/App/OriginGroupExtensionPyImp.cpp index 471e4d11ea..4eedc185a8 100644 --- a/src/App/OriginGroupExtensionPyImp.cpp +++ b/src/App/OriginGroupExtensionPyImp.cpp @@ -30,7 +30,7 @@ using namespace App; // returns a string which represents the object e.g. when printed in python -std::string OriginGroupExtensionPy::representation(void) const +std::string OriginGroupExtensionPy::representation() const { return std::string(""); } diff --git a/src/App/Part.cpp b/src/App/Part.cpp index de50bcf561..e9c56ee675 100644 --- a/src/App/Part.cpp +++ b/src/App/Part.cpp @@ -40,7 +40,7 @@ PROPERTY_SOURCE_WITH_EXTENSIONS(App::Part, App::GeoFeature) //=========================================================================== -Part::Part(void) +Part::Part() { ADD_PROPERTY(Type,("")); ADD_PROPERTY_TYPE(Material, (nullptr), 0, App::Prop_None, "The Material for this Part"); @@ -60,7 +60,7 @@ Part::Part(void) GroupExtension::initExtension(this); } -Part::~Part(void) +Part::~Part() { } diff --git a/src/App/PartPyImp.cpp b/src/App/PartPyImp.cpp index 88e566afca..6fd5228b51 100644 --- a/src/App/PartPyImp.cpp +++ b/src/App/PartPyImp.cpp @@ -30,7 +30,7 @@ using namespace App; // returns a string which represents the object e.g. when printed in python -std::string PartPy::representation(void) const +std::string PartPy::representation() const { return std::string(""); } diff --git a/src/App/Path.cpp b/src/App/Path.cpp index 80bb105a76..421293f54b 100644 --- a/src/App/Path.cpp +++ b/src/App/Path.cpp @@ -28,7 +28,7 @@ using namespace App; -Path::Path(void) +Path::Path() { } @@ -37,7 +37,7 @@ Path::Path(const std::vector &PathVector) { } -Path::~Path(void) +Path::~Path() { } diff --git a/src/App/Path.h b/src/App/Path.h index ce0714848f..b0007fafa4 100644 --- a/src/App/Path.h +++ b/src/App/Path.h @@ -39,12 +39,12 @@ protected: public: /// Constructor - Path(void); + Path(); Path(const std::vector & PathVector); virtual ~Path(); - const std::vector & getVector(void)const{return _PathVector;} + const std::vector & getVector()const{return _PathVector;} }; diff --git a/src/App/Placement.cpp b/src/App/Placement.cpp index dadba176ad..a8c95aa527 100644 --- a/src/App/Placement.cpp +++ b/src/App/Placement.cpp @@ -37,12 +37,12 @@ PROPERTY_SOURCE(App::Placement, App::GeoFeature) // Feature //=========================================================================== -Placement::Placement(void) +Placement::Placement() { } -Placement::~Placement(void) +Placement::~Placement() { } @@ -51,7 +51,7 @@ Placement::~Placement(void) // Python feature --------------------------------------------------------- namespace App { PROPERTY_SOURCE_TEMPLATE(App::PlacementPython, App::Placement) -template<> const char* App::PlacementPython::getViewProviderName(void) const { +template<> const char* App::PlacementPython::getViewProviderName() const { return "Gui::ViewProviderPlacementPython"; } template class AppExport FeaturePythonT; diff --git a/src/App/Placement.h b/src/App/Placement.h index b6aed5a508..633adf8fde 100644 --- a/src/App/Placement.h +++ b/src/App/Placement.h @@ -38,11 +38,11 @@ class AppExport Placement: public App::GeoFeature public: /// Constructor - Placement(void); + Placement(); virtual ~Placement(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderPlacement"; } diff --git a/src/App/Property.cpp b/src/App/Property.cpp index a1fc917b8e..bb26a6d0a7 100644 --- a/src/App/Property.cpp +++ b/src/App/Property.cpp @@ -91,7 +91,7 @@ std::string Property::getFullName() const { return name; } -short Property::getType(void) const +short Property::getType() const { short type = 0; #define GET_PTYPE(_name) do {\ @@ -118,12 +118,12 @@ void Property::syncType(unsigned type) { SYNC_PTYPE(NoPersist); } -const char* Property::getGroup(void) const +const char* Property::getGroup() const { return father->getPropertyGroup(this); } -const char* Property::getDocumentation(void) const +const char* Property::getDocumentation() const { return father->getPropertyDocumentation(this); } @@ -224,7 +224,7 @@ void Property::setReadOnly(bool readOnly) this->setStatus(App::Property::ReadOnly, readOnly); } -void Property::hasSetValue(void) +void Property::hasSetValue() { PropertyCleaner guard(this); if (father) { @@ -237,7 +237,7 @@ void Property::hasSetValue(void) StatusBits.set(Touched); } -void Property::aboutToSetValue(void) +void Property::aboutToSetValue() { if (father) father->onBeforeChange(this); @@ -248,7 +248,7 @@ void Property::verifyPath(const ObjectIdentifier &p) const p.verify(*this); } -Property *Property::Copy(void) const +Property *Property::Copy() const { // have to be reimplemented by a subclass! assert(0); diff --git a/src/App/Property.h b/src/App/Property.h index c124205766..12ba2bc23f 100644 --- a/src/App/Property.h +++ b/src/App/Property.h @@ -112,7 +112,7 @@ public: * This method is defined in Base::Persistence * @see Base::Persistence */ - virtual unsigned int getMemSize (void) const override { + virtual unsigned int getMemSize () const override { // you have to implement this method in all property classes! return sizeof(father) + sizeof(StatusBits); } @@ -121,7 +121,7 @@ public: * With \ref hasName() it can be checked beforehand if a valid name is set. * @note If no name is set this function returns an empty string, i.e. "". */ - const char* getName(void) const; + const char* getName() const; /** Check if the property has a name set. * If no name is set then \ref getName() will return an empty string */ @@ -135,22 +135,22 @@ public: std::string getFullName() const; /// Get the class name of the associated property editor item - virtual const char* getEditorName(void) const { return ""; } + virtual const char* getEditorName() const { return ""; } /// Get the type of the property in the container - short getType(void) const; + short getType() const; /// Get the group of this property - const char* getGroup(void) const; + const char* getGroup() const; /// Get the documentation of this property - const char* getDocumentation(void) const; + const char* getDocumentation() const; /// Is called by the framework to set the father (container) void setContainer(PropertyContainer *Father); /// Get a pointer to the PropertyContainer derived class the property belongs to - PropertyContainer *getContainer(void) const {return father;} + PropertyContainer *getContainer() const {return father;} /// Set value of property virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value); @@ -206,11 +206,11 @@ public: /// Set the property touched void touch(); /// Test if this property is touched - inline bool isTouched(void) const { + inline bool isTouched() const { return StatusBits.test(Touched); } /// Reset this property touched - inline void purgeTouched(void) { + inline void purgeTouched() { StatusBits.reset(Touched); } /// return the status bits @@ -239,7 +239,7 @@ public: //@} /// Returns a new copy of the property (mainly for Undo/Redo and transactions) - virtual Property *Copy(void) const = 0; + virtual Property *Copy() const = 0; /// Paste the value from the property (mainly for Undo/Redo and transactions) virtual void Paste(const Property &from) = 0; @@ -279,9 +279,9 @@ protected: protected: /// Gets called by all setValue() methods after the value has changed - virtual void hasSetValue(void); + virtual void hasSetValue(); /// Gets called by all setValue() methods before the value has changed - virtual void aboutToSetValue(void); + virtual void aboutToSetValue(); /// Verify a path for the current property virtual void verifyPath(const App::ObjectIdentifier & p) const; @@ -423,7 +423,7 @@ class AppExport PropertyListsBase { public: virtual void setSize(int newSize)=0; - virtual int getSize(void) const =0; + virtual int getSize() const =0; const std::set &getTouchList() const { return _touchList; @@ -490,7 +490,7 @@ public: _lValueList.resize(newSize); } - virtual int getSize(void) const override { + virtual int getSize() const override { return static_cast(_lValueList.size()); } @@ -511,10 +511,10 @@ public: setValues(newValues); } - const ListT &getValues(void) const{return _lValueList;} + const ListT &getValues() const{return _lValueList;} // alias to getValues - const ListT &getValue(void) const{return getValues();} + const ListT &getValue() const{return getValues();} const_reference operator[] (int idx) const {return _lValueList[idx];} diff --git a/src/App/PropertyContainer.cpp b/src/App/PropertyContainer.cpp index 97e6a4b539..51d147911c 100644 --- a/src/App/PropertyContainer.cpp +++ b/src/App/PropertyContainer.cpp @@ -55,7 +55,7 @@ PropertyContainer::~PropertyContainer() } -unsigned int PropertyContainer::getMemSize (void) const +unsigned int PropertyContainer::getMemSize () const { std::map Map; getPropertyMap(Map); @@ -77,7 +77,7 @@ App::Property* PropertyContainer::addDynamicProperty( Property *PropertyContainer::getPropertyByName(const char* name) const { auto prop = dynamicProps.getDynamicPropertyByName(name); - if(prop) + if(prop) return prop; return getPropertyData().getPropertyByName(this,name); } @@ -121,7 +121,7 @@ short PropertyContainer::getPropertyType(const char *name) const const char* PropertyContainer::getPropertyGroup(const Property* prop) const { auto group = dynamicProps.getPropertyGroup(prop); - if(group) + if(group) return group; return getPropertyData().getGroup(this,prop); } @@ -129,7 +129,7 @@ const char* PropertyContainer::getPropertyGroup(const Property* prop) const const char* PropertyContainer::getPropertyGroup(const char *name) const { auto group = dynamicProps.getPropertyGroup(name); - if(group) + if(group) return group; return getPropertyData().getGroup(this,name); } @@ -137,7 +137,7 @@ const char* PropertyContainer::getPropertyGroup(const char *name) const const char* PropertyContainer::getPropertyDocumentation(const Property* prop) const { auto doc = dynamicProps.getPropertyDocumentation(prop); - if(doc) + if(doc) return doc; return getPropertyData().getDocumentation(this,prop); } @@ -145,7 +145,7 @@ const char* PropertyContainer::getPropertyDocumentation(const Property* prop) co const char* PropertyContainer::getPropertyDocumentation(const char *name) const { auto doc = dynamicProps.getPropertyDocumentation(name); - if(doc) + if(doc) return doc; return getPropertyData().getDocumentation(this,name); } @@ -178,8 +178,8 @@ const char* PropertyContainer::getPropertyName(const Property* prop)const return res; } -const PropertyData * PropertyContainer::getPropertyDataPtr(void){return &propertyData;} -const PropertyData & PropertyContainer::getPropertyData(void) const{return propertyData;} +const PropertyData * PropertyContainer::getPropertyDataPtr(){return &propertyData;} +const PropertyData & PropertyContainer::getPropertyData() const{return propertyData;} /** * @brief PropertyContainer::handleChangedPropertyName is called during restore to possibly diff --git a/src/App/PropertyContainer.h b/src/App/PropertyContainer.h index feddcfe5e5..339de9455d 100644 --- a/src/App/PropertyContainer.h +++ b/src/App/PropertyContainer.h @@ -156,7 +156,7 @@ public: */ virtual ~PropertyContainer(); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual std::string getFullName() const {return std::string();} @@ -242,8 +242,8 @@ protected: virtual void onBeforeChange(const Property* /*prop*/){} //void hasChanged(Property* prop); - static const PropertyData * getPropertyDataPtr(void); - virtual const PropertyData& getPropertyData(void) const; + static const PropertyData * getPropertyDataPtr(); + virtual const PropertyData& getPropertyData() const; virtual void handleChangedPropertyName(Base::XMLReader &reader, const char * TypeName, const char *PropName); virtual void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, Property * prop); diff --git a/src/App/PropertyContainerPyImp.cpp b/src/App/PropertyContainerPyImp.cpp index 591d03544c..03e84a5d59 100644 --- a/src/App/PropertyContainerPyImp.cpp +++ b/src/App/PropertyContainerPyImp.cpp @@ -43,7 +43,7 @@ FC_LOG_LEVEL_INIT("Property", true, 2) using namespace App; // returns a string which represent the object e.g. when printed in python -std::string PropertyContainerPy::representation(void) const +std::string PropertyContainerPy::representation() const { return std::string(""); } @@ -448,7 +448,7 @@ PyObject* PropertyContainerPy::getEnumerationsOfProperty(PyObject *args) return Py::new_reference_to(ret); } -Py::List PropertyContainerPy::getPropertiesList(void) const +Py::List PropertyContainerPy::getPropertiesList() const { Py::List ret; std::map Map; diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index 95f8103670..f8c92e7a46 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -854,7 +854,7 @@ void PropertyExpressionEngine::renameObjectIdentifiers(const std::map getExpressions() const override; virtual void setExpressions(std::map &&exprs) override; @@ -115,7 +115,7 @@ public: void setValue() { } // Dummy - Property *Copy(void) const override; + Property *Copy() const override; void Paste(const Property &from) override; @@ -168,7 +168,7 @@ public: virtual void onContainerRestored() override; /* Python interface */ - PyObject *getPyObject(void) override; + PyObject *getPyObject() override; void setPyObject(PyObject *) override; protected: diff --git a/src/App/PropertyFile.cpp b/src/App/PropertyFile.cpp index 368eef20fb..7afa834a50 100644 --- a/src/App/PropertyFile.cpp +++ b/src/App/PropertyFile.cpp @@ -593,7 +593,7 @@ void PropertyFile::setFilter(const std::string f) m_filter = f; } -std::string PropertyFile::getFilter(void) const +std::string PropertyFile::getFilter() const { return m_filter; } diff --git a/src/App/PropertyFile.h b/src/App/PropertyFile.h index 97061023f4..421651c67e 100644 --- a/src/App/PropertyFile.h +++ b/src/App/PropertyFile.h @@ -51,7 +51,7 @@ public: { return "Gui::PropertyEditor::PropertyFileItem"; } virtual void setFilter(const std::string filter); - virtual std::string getFilter(void) const; + virtual std::string getFilter() const; private: std::string m_filter; @@ -114,7 +114,7 @@ public: std::string getExchangeTempFile() const; std::string getOriginalFileName() const; - bool isEmpty(void) const {return _cValue.empty();} + bool isEmpty() const {return _cValue.empty();} protected: // get the transient path if the property is in a DocumentObject diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index aa8ebe810c..53c23c823f 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -88,12 +88,12 @@ void PropertyVector::setValue(double x, double y, double z) hasSetValue(); } -const Base::Vector3d & PropertyVector::getValue(void)const +const Base::Vector3d & PropertyVector::getValue()const { return _cVec; } -PyObject *PropertyVector::getPyObject(void) +PyObject *PropertyVector::getPyObject() { return new Base::VectorPy(_cVec); } @@ -159,7 +159,7 @@ void PropertyVector::Restore(Base::XMLReader &reader) } -Property *PropertyVector::Copy(void) const +Property *PropertyVector::Copy() const { PropertyVector *p= new PropertyVector(); p->_cVec = _cVec; @@ -302,7 +302,7 @@ void PropertyVectorList::setValue(double x, double y, double z) setValue(Base::Vector3d(x,y,z)); } -PyObject *PropertyVectorList::getPyObject(void) +PyObject *PropertyVectorList::getPyObject() { PyObject* list = PyList_New( getSize() ); @@ -377,7 +377,7 @@ void PropertyVectorList::RestoreDocFile(Base::Reader &reader) setValues(values); } -Property *PropertyVectorList::Copy(void) const +Property *PropertyVectorList::Copy() const { PropertyVectorList *p= new PropertyVectorList(); p->_lValueList = _lValueList; @@ -389,7 +389,7 @@ void PropertyVectorList::Paste(const Property &from) setValues(dynamic_cast(from)._lValueList); } -unsigned int PropertyVectorList::getMemSize (void) const +unsigned int PropertyVectorList::getMemSize () const { return static_cast(_lValueList.size() * sizeof(Base::Vector3d)); } @@ -428,12 +428,12 @@ void PropertyMatrix::setValue(const Base::Matrix4D &mat) } -const Base::Matrix4D & PropertyMatrix::getValue(void)const +const Base::Matrix4D & PropertyMatrix::getValue()const { return _cMat; } -PyObject *PropertyMatrix::getPyObject(void) +PyObject *PropertyMatrix::getPyObject() { return new Base::MatrixPy(_cMat); } @@ -508,7 +508,7 @@ void PropertyMatrix::Restore(Base::XMLReader &reader) } -Property *PropertyMatrix::Copy(void) const +Property *PropertyMatrix::Copy() const { PropertyMatrix *p= new PropertyMatrix(); p->_cMat = _cMat; @@ -567,7 +567,7 @@ bool PropertyPlacement::setValueIfChanged(const Base::Placement &pos,double tol, } -const Base::Placement & PropertyPlacement::getValue(void)const +const Base::Placement & PropertyPlacement::getValue()const { return _cPos; } @@ -664,7 +664,7 @@ bool PropertyPlacement::getPyPathValue(const ObjectIdentifier &path, Py::Object return true; } -PyObject *PropertyPlacement::getPyObject(void) +PyObject *PropertyPlacement::getPyObject() { return new Base::PlacementPy(new Base::Placement(_cPos)); } @@ -739,7 +739,7 @@ void PropertyPlacement::Restore(Base::XMLReader &reader) } -Property *PropertyPlacement::Copy(void) const +Property *PropertyPlacement::Copy() const { PropertyPlacement *p= new PropertyPlacement(); p->_cPos = _cPos; @@ -776,7 +776,7 @@ PropertyPlacementList::~PropertyPlacementList() //************************************************************************** // Base class implementer -PyObject *PropertyPlacementList::getPyObject(void) +PyObject *PropertyPlacementList::getPyObject() { PyObject* list = PyList_New( getSize() ); @@ -864,7 +864,7 @@ void PropertyPlacementList::RestoreDocFile(Base::Reader &reader) setValues(values); } -Property *PropertyPlacementList::Copy(void) const +Property *PropertyPlacementList::Copy() const { PropertyPlacementList *p= new PropertyPlacementList(); p->_lValueList = _lValueList; @@ -876,7 +876,7 @@ void PropertyPlacementList::Paste(const Property &from) setValues(dynamic_cast(from)._lValueList); } -unsigned int PropertyPlacementList::getMemSize (void) const +unsigned int PropertyPlacementList::getMemSize () const { return static_cast(_lValueList.size() * sizeof(Base::Vector3d)); } @@ -906,7 +906,7 @@ PropertyPlacementLink::~PropertyPlacementLink() } -App::Placement * PropertyPlacementLink::getPlacementObject(void) const +App::Placement * PropertyPlacementLink::getPlacementObject() const { if (_pcLink->getTypeId().isDerivedFrom(App::Placement::getClassTypeId())) return dynamic_cast(_pcLink); @@ -918,7 +918,7 @@ App::Placement * PropertyPlacementLink::getPlacementObject(void) const //************************************************************************** // Base class implementer -Property *PropertyPlacementLink::Copy(void) const +Property *PropertyPlacementLink::Copy() const { PropertyPlacementLink *p= new PropertyPlacementLink(); p->_pcLink = _pcLink; diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index 1515809be7..07d1152403 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -79,21 +79,21 @@ public: /** This method returns a string representation of the property */ - const Base::Vector3d &getValue(void) const; - const char* getEditorName(void) const override { + const Base::Vector3d &getValue() const; + const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyVectorItem"; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override { + virtual unsigned int getMemSize () const override { return sizeof(Base::Vector3d); } @@ -138,7 +138,7 @@ public: return Base::Unit::Length; } - const char* getEditorName(void) const { + const char* getEditorName() const { return "Gui::PropertyEditor::PropertyVectorDistanceItem"; } }; @@ -164,7 +164,7 @@ public: return Base::Unit::Length; } - const char* getEditorName(void) const { + const char* getEditorName() const { return "Gui::PropertyEditor::PropertyPositionItem"; } }; @@ -190,7 +190,7 @@ public: return Base::Unit::Length; } - const char* getEditorName(void) const { + const char* getEditorName() const { return "Gui::PropertyEditor::PropertyDirectionItem"; } }; @@ -217,7 +217,7 @@ public: void setValue(double x, double y, double z); using inherited::setValue; - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; @@ -225,11 +225,11 @@ public: virtual void SaveDocFile (Base::Writer &writer) const override; virtual void RestoreDocFile(Base::Reader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; - const char* getEditorName(void) const override { + virtual unsigned int getMemSize () const override; + const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyVectorListItem"; } @@ -264,21 +264,21 @@ public: /** This method returns a string representation of the property */ - const Base::Matrix4D &getValue(void) const; - const char* getEditorName(void) const { + const Base::Matrix4D &getValue() const; + const char* getEditorName() const { return "Gui::PropertyEditor::PropertyMatrixItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const { + virtual unsigned int getMemSize () const { return sizeof(Base::Matrix4D); } @@ -328,7 +328,7 @@ public: /** This method returns a string representation of the property */ - const Base::Placement &getValue(void) const; + const Base::Placement &getValue() const; /// Get valid paths for this property; used by auto completer void getPaths(std::vector &paths) const override; @@ -339,20 +339,20 @@ public: virtual bool getPyPathValue(const ObjectIdentifier &path, Py::Object &res) const override; - const char* getEditorName(void) const override { + const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyPlacementItem"; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override { + virtual unsigned int getMemSize () const override { return sizeof(Base::Placement); } @@ -391,9 +391,9 @@ public: /** This method returns the linked DocumentObject */ - App::Placement * getPlacementObject(void) const; + App::Placement * getPlacementObject() const; - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); }; @@ -410,7 +410,7 @@ public: virtual ~PropertyPlacementList(); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; @@ -418,10 +418,10 @@ public: virtual void SaveDocFile (Base::Writer &writer) const override; virtual void RestoreDocFile(Base::Reader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: Base::Placement getPyValue(PyObject *) const override; diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index a511bf026e..6b4507c9fd 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -441,7 +441,7 @@ void PropertyLink::setValue(App::DocumentObject * lValue) hasSetValue(); } -App::DocumentObject * PropertyLink::getValue(void) const +App::DocumentObject * PropertyLink::getValue() const { return _pcLink; } @@ -451,7 +451,7 @@ App::DocumentObject * PropertyLink::getValue(Base::Type t) const return (_pcLink && _pcLink->getTypeId().isDerivedFrom(t)) ? _pcLink : nullptr; } -PyObject *PropertyLink::getPyObject(void) +PyObject *PropertyLink::getPyObject() { if (_pcLink) return _pcLink->getPyObject(); @@ -515,7 +515,7 @@ void PropertyLink::Restore(Base::XMLReader &reader) } } -Property *PropertyLink::Copy(void) const +Property *PropertyLink::Copy() const { PropertyLink *p= new PropertyLink(); p->_pcLink = _pcLink; @@ -691,7 +691,7 @@ void PropertyLinkList::setValues(const std::vector& lValue) { inherited::setValues(lValue); } -PyObject *PropertyLinkList::getPyObject(void) +PyObject *PropertyLinkList::getPyObject() { int count = getSize(); #if 0//FIXME: Should switch to tuple @@ -813,7 +813,7 @@ Property *PropertyLinkList::CopyOnLinkReplace(const App::DocumentObject *parent, return p; } -Property *PropertyLinkList::Copy(void) const +Property *PropertyLinkList::Copy() const { PropertyLinkList *p = new PropertyLinkList(); p->_lValueList = _lValueList; @@ -828,7 +828,7 @@ void PropertyLinkList::Paste(const Property &from) setValues(static_cast(from)._lValueList); } -unsigned int PropertyLinkList::getMemSize(void) const +unsigned int PropertyLinkList::getMemSize() const { return static_cast(_lValueList.size() * sizeof(App::DocumentObject *)); } @@ -963,12 +963,12 @@ void PropertyLinkSub::setValue(App::DocumentObject * lValue, hasSetValue(); } -App::DocumentObject * PropertyLinkSub::getValue(void) const +App::DocumentObject * PropertyLinkSub::getValue() const { return _pcLinkSub; } -const std::vector& PropertyLinkSub::getSubValues(void) const +const std::vector& PropertyLinkSub::getSubValues() const { return _cSubList; } @@ -1009,7 +1009,7 @@ App::DocumentObject * PropertyLinkSub::getValue(Base::Type t) const return (_pcLinkSub && _pcLinkSub->getTypeId().isDerivedFrom(t)) ? _pcLinkSub : nullptr; } -PyObject *PropertyLinkSub::getPyObject(void) +PyObject *PropertyLinkSub::getPyObject() { Py::Tuple tup(2); Py::List list(static_cast(_cSubList.size())); @@ -1478,7 +1478,7 @@ Property *PropertyLinkSub::CopyOnLinkReplace(const App::DocumentObject *parent, return nullptr; } -Property *PropertyLinkSub::Copy(void) const +Property *PropertyLinkSub::Copy() const { PropertyLinkSub *p= new PropertyLinkSub(); p->_pcLinkSub = _pcLinkSub; @@ -1621,7 +1621,7 @@ void PropertyLinkSubList::setSize(int newSize) _ShadowSubList.resize(newSize); } -int PropertyLinkSubList::getSize(void) const +int PropertyLinkSubList::getSize() const { return static_cast(_lValueList.size()); } @@ -1977,7 +1977,7 @@ std::vector PropertyLinkSubList::getSubListValues(b return values; } -PyObject *PropertyLinkSubList::getPyObject(void) +PyObject *PropertyLinkSubList::getPyObject() { std::vector subLists = getSubListValues(); std::size_t count = subLists.size(); @@ -2407,7 +2407,7 @@ Property *PropertyLinkSubList::CopyOnLinkReplace(const App::DocumentObject *pare return p.release(); } -Property *PropertyLinkSubList::Copy(void) const +Property *PropertyLinkSubList::Copy() const { PropertyLinkSubList *p = new PropertyLinkSubList(); p->_lValueList = _lValueList; @@ -2423,7 +2423,7 @@ void PropertyLinkSubList::Paste(const Property &from) setValues(link._lValueList, link._lSubList); } -unsigned int PropertyLinkSubList::getMemSize (void) const +unsigned int PropertyLinkSubList::getMemSize () const { unsigned int size = static_cast(_lValueList.size() * sizeof(App::DocumentObject *)); for(int i = 0;i p(new PropertyXLink); copyTo(*p); @@ -3615,7 +3615,7 @@ PropertyXLink::getDocumentInList(App::Document *doc) { return ret; } -PyObject *PropertyXLink::getPyObject(void) +PyObject *PropertyXLink::getPyObject() { if(!_pcLink) Py_Return; @@ -3777,7 +3777,7 @@ bool PropertyXLinkSub::upgrade(Base::XMLReader &reader, const char *typeName) { return PropertyXLink::upgrade(reader,typeName); } -PyObject *PropertyXLinkSub::getPyObject(void) +PyObject *PropertyXLinkSub::getPyObject() { if(!_pcLink) Py_Return; @@ -3820,7 +3820,7 @@ void PropertyXLinkSubList::setSyncSubObject(bool enable) _Flags.set((std::size_t)LinkSyncSubObject, enable); } -int PropertyXLinkSubList::getSize(void) const +int PropertyXLinkSubList::getSize() const { return static_cast(_Links.size()); } @@ -4033,7 +4033,7 @@ int PropertyXLinkSubList::removeValue(App::DocumentObject *lValue) return ret; } -PyObject *PropertyXLinkSubList::getPyObject(void) +PyObject *PropertyXLinkSubList::getPyObject() { Py::List list; for(auto &link : _Links) { @@ -4255,7 +4255,7 @@ Property *PropertyXLinkSubList::CopyOnLinkReplace(const App::DocumentObject *par return p.release(); } -Property *PropertyXLinkSubList::Copy(void) const +Property *PropertyXLinkSubList::Copy() const { PropertyXLinkSubList *p = new PropertyXLinkSubList(); for(auto &l : _Links) { @@ -4279,7 +4279,7 @@ void PropertyXLinkSubList::Paste(const Property &from) hasSetValue(); } -unsigned int PropertyXLinkSubList::getMemSize (void) const +unsigned int PropertyXLinkSubList::getMemSize () const { unsigned int size=0; for(auto &l : _Links) @@ -4459,7 +4459,7 @@ void PropertyXLinkSubList::aboutToSetChildValue(Property &) { } } -std::vector PropertyXLinkSubList::getValues(void) const +std::vector PropertyXLinkSubList::getValues() const { std::vector xLinks; getLinks(xLinks); @@ -4483,7 +4483,7 @@ PropertyXLinkList::~PropertyXLinkList() { } -PyObject *PropertyXLinkList::getPyObject(void) +PyObject *PropertyXLinkList::getPyObject() { for(auto &link : _Links) { auto obj = link.getValue(); diff --git a/src/App/PropertyLinks.h b/src/App/PropertyLinks.h index 08f508036c..b8ceaec259 100644 --- a/src/App/PropertyLinks.h +++ b/src/App/PropertyLinks.h @@ -592,7 +592,7 @@ public: /** This method returns the linked DocumentObject */ - App::DocumentObject * getValue(void) const; + App::DocumentObject * getValue() const; /** Returns the link type checked */ @@ -601,23 +601,23 @@ public: /** Returns the link type checked */ template - inline _type getValue(void) const { + inline _type getValue() const { return _pcLink ? dynamic_cast<_type>(_pcLink) : 0; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override { + virtual unsigned int getMemSize () const override { return sizeof(App::DocumentObject *); } - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkItem"; } virtual void getLinks(std::vector &objs, @@ -698,16 +698,16 @@ public: void set1Value(int idx, DocumentObject * const &value) override; - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save(Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize(void) const override; - virtual const char* getEditorName(void) const override + virtual unsigned int getMemSize() const override; + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkListItem"; } virtual void getLinks(std::vector &objs, @@ -795,10 +795,10 @@ public: /** This method returns the linked DocumentObject */ - App::DocumentObject * getValue(void) const; + App::DocumentObject * getValue() const; /// return the list of sub elements - const std::vector& getSubValues(void) const; + const std::vector& getSubValues() const; /// return the list of sub elements with mapped names const std::vector &getShadowSubs() const { @@ -817,20 +817,20 @@ public: /** Returns the link type checked */ template - inline _type getValue(void) const { + inline _type getValue() const { return _pcLinkSub ? dynamic_cast<_type>(_pcLinkSub) : 0; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkItem"; } /// Return a copy of the property if any changes caused by importing external object @@ -842,7 +842,7 @@ public: virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - virtual unsigned int getMemSize (void) const override { + virtual unsigned int getMemSize () const override { return sizeof(App::DocumentObject *); } @@ -915,7 +915,7 @@ public: virtual void afterRestore() override; virtual void onContainerRestored() override; - int getSize(void) const; + int getSize() const; void setSize(int newSize); /** Sets the property. @@ -936,7 +936,7 @@ public: void addValue(App::DocumentObject *obj, const std::vector &SubList={}, bool reset = false); - const std::vector &getValues(void) const { + const std::vector &getValues() const { return _lValueList; } @@ -950,7 +950,7 @@ public: */ DocumentObject* getValue() const; - const std::vector &getSubValues(void) const { + const std::vector &getSubValues() const { return _lSubList; } @@ -969,17 +969,17 @@ public: void setSubListValues(const std::vector&); std::vector getSubListValues(bool newStyle=false) const; - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; bool upgrade(Base::XMLReader &reader, const char *typeName); - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkListItem"; } /// Return a copy of the property if any changes caused by importing external object @@ -991,7 +991,7 @@ public: virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; virtual void updateElementReference( DocumentObject *feature,bool reverse=false, bool notify=false) override; @@ -1092,7 +1092,7 @@ public: virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; /// Return a copy of the property if any changes caused by importing external object @@ -1104,7 +1104,7 @@ public: virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; friend class DocInfo; @@ -1126,7 +1126,7 @@ public: virtual bool adjustLink(const std::set &inList) override; - const std::vector& getSubValues(void) const { + const std::vector& getSubValues() const { return _SubList; } const std::vector &getShadowSubs() const { @@ -1184,9 +1184,9 @@ public: virtual bool upgrade(Base::XMLReader &reader, const char *typeName) override; - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkItem"; } }; @@ -1208,7 +1208,7 @@ public: virtual void afterRestore() override; virtual void onContainerRestored() override; - int getSize(void) const; + int getSize() const; /** Sets the property. * setValue(0, whatever) clears the property @@ -1231,7 +1231,7 @@ public: */ void setValue(App::DocumentObject *lValue, const std::vector &SubList={}); - std::vector getValues(void) const; + std::vector getValues() const; const std::string getPyReprString() const; @@ -1255,16 +1255,16 @@ public: return _Links; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyLinkListItem"; } virtual Property *CopyOnImportExternal(const std::map &nameMap) const override; @@ -1275,7 +1275,7 @@ public: virtual Property *CopyOnLinkReplace(const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; virtual void updateElementReference( DocumentObject *feature,bool reverse=false, bool notify=false) override; @@ -1318,7 +1318,7 @@ public: PropertyXLinkList(); virtual ~PropertyXLinkList(); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; }; diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index 810605ea05..dc80057849 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -66,7 +66,7 @@ Py::Object PropertyPythonObject::getValue() const return object; } -PyObject *PropertyPythonObject::getPyObject(void) +PyObject *PropertyPythonObject::getPyObject() { return Py::new_reference_to(this->object); } @@ -400,12 +400,12 @@ void PropertyPythonObject::RestoreDocFile(Base::Reader &reader) hasSetValue(); } -unsigned int PropertyPythonObject::getMemSize (void) const +unsigned int PropertyPythonObject::getMemSize () const { return sizeof(Py::Object); } -Property *PropertyPythonObject::Copy(void) const +Property *PropertyPythonObject::Copy() const { PropertyPythonObject *p = new PropertyPythonObject(); Base::PyGILStateLocker lock; diff --git a/src/App/PropertyPythonObject.h b/src/App/PropertyPythonObject.h index dfaea0f7bd..96cd5c4d48 100644 --- a/src/App/PropertyPythonObject.h +++ b/src/App/PropertyPythonObject.h @@ -47,13 +47,13 @@ class AppExport PropertyPythonObject : public Property TYPESYSTEM_HEADER(); public: - PropertyPythonObject(void); + PropertyPythonObject(); virtual ~PropertyPythonObject(); void setValue(Py::Object); Py::Object getValue() const; - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); /** Use Python's pickle module to save the object */ @@ -63,8 +63,8 @@ public: virtual void SaveDocFile (Base::Writer &writer) const; virtual void RestoreDocFile(Base::Reader &reader); - virtual unsigned int getMemSize (void) const; - virtual Property *Copy(void) const; + virtual unsigned int getMemSize () const; + virtual Property *Copy() const; virtual void Paste(const Property &from); std::string toString() const; diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index c7e8a2d151..acc939c998 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -201,7 +201,7 @@ void PropertyPath::setValue(const char * Path) hasSetValue(); } -const boost::filesystem::path &PropertyPath::getValue(void) const +const boost::filesystem::path &PropertyPath::getValue() const { return _cValue; } @@ -2748,7 +2748,7 @@ unsigned int PropertyMaterialList::getMemSize() const TYPESYSTEM_SOURCE(App::PropertyPersistentObject , App::PropertyString) -PyObject *PropertyPersistentObject::getPyObject(void){ +PyObject *PropertyPersistentObject::getPyObject(){ if(_pObject) return _pObject->getPyObject(); return inherited::getPyObject(); @@ -2774,7 +2774,7 @@ void PropertyPersistentObject::Restore(Base::XMLReader &reader){ reader.readEndElement(ELEMENT_PERSISTENT_OBJ); } -Property *PropertyPersistentObject::Copy(void) const{ +Property *PropertyPersistentObject::Copy() const{ auto *p= new PropertyPersistentObject(); p->_cValue = _cValue; p->_pObject = _pObject; diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index d4de1f6c01..ac9c1c6b19 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -62,19 +62,19 @@ public: /** This method returns a string representation of the property */ - long getValue(void) const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyIntegerItem"; } + long getValue() const; + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyIntegerItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const{return sizeof(long);} + virtual unsigned int getMemSize () const{return sizeof(long);} virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value); virtual const boost::any getPathValue(const App::ObjectIdentifier & /*path*/) const { return _lValue; } @@ -112,20 +112,20 @@ public: /** This method returns a string representation of the property */ - const boost::filesystem::path &getValue(void) const; + const boost::filesystem::path &getValue() const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyPathItem"; } + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyPathItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual bool isSame(const Property &other) const { if (&other == this) @@ -186,7 +186,7 @@ public: void setValue(const Enumeration &source); /// Returns current value of the enumeration as an integer - long getValue(void) const; + long getValue() const; /// checks if the property is set to a certain string value bool isValue(const char* value) const; @@ -195,13 +195,13 @@ public: bool isPartOf(const char* value) const; /// get the value as string - const char * getValueAsString(void) const; + const char * getValueAsString() const; /// Returns Enumeration object - const Enumeration &getEnum(void) const; + const Enumeration &getEnum() const; /// get all possible enum values as vector of strings - std::vector getEnumVector(void) const; + std::vector getEnumVector() const; /// set enum values as vector of strings void setEnumVector(const std::vector &); @@ -209,19 +209,19 @@ public: bool hasEnums() const; /// Returns true if the instance is in a usable state - bool isValid(void) const; + bool isValid() const; //@} - const char* getEditorName(void) const { return _editorTypeName.c_str(); } + const char* getEditorName() const { return _editorTypeName.c_str(); } void setEditorName(const char* name) { _editorTypeName = name; } - virtual PyObject * getPyObject(void); + virtual PyObject * getPyObject(); virtual void setPyObject(PyObject *); virtual void Save(Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property * Copy(void) const; + virtual Property * Copy() const; virtual void Paste(const Property &from); virtual void setPathValue(const App::ObjectIdentifier & path, const boost::any & value); @@ -301,14 +301,14 @@ public: */ void setConstraints(const Constraints* sConstraint); /// get the constraint struct - const Constraints* getConstraints(void) const; + const Constraints* getConstraints() const; //@} long getMinimum() const; long getMaximum() const; long getStepSize() const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyIntegerConstraintItem"; } + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyIntegerConstraintItem"; } virtual void setPyObject(PyObject *); protected: @@ -353,17 +353,17 @@ public: */ virtual ~PropertyIntegerList(); - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyIntegerListItem"; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: long getPyValue(PyObject *item) const override; @@ -393,22 +393,22 @@ public: /** Sets the property */ void setValue(long); - void setValue(void){;} + void setValue(){;} void addValue (long value){_lValueSet.insert(value);} void setValues (const std::set& values); - const std::set &getValues(void) const{return _lValueSet;} + const std::set &getValues() const{return _lValueSet;} - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual bool isSame(const Property &other) const { if (&other == this) @@ -442,11 +442,11 @@ public: */ virtual ~PropertyMap(); - virtual int getSize(void) const; + virtual int getSize() const; /** Sets the property */ - void setValue(void){} + void setValue(){} void setValue(const std::string& key,const std::string& value); void setValues(const std::map&); @@ -455,20 +455,20 @@ public: void set1Value (const std::string& key, const std::string& value){_lValueList.operator[] (key) = value;} - const std::map &getValues(void) const{return _lValueList;} + const std::map &getValues() const{return _lValueList;} //virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyStringListItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual bool isSame(const Property &other) const { if (&other == this) @@ -498,7 +498,7 @@ public: /** Value Constructor * Construct with explicit Values */ - PropertyFloat(void); + PropertyFloat(); /** * A destructor. @@ -508,20 +508,20 @@ public: void setValue(double lValue); - double getValue(void) const; + double getValue() const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyFloatItem"; } + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyFloatItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const{return sizeof(double);} + virtual unsigned int getMemSize () const{return sizeof(double);} void setPathValue(const App::ObjectIdentifier &path, const boost::any &value); const boost::any getPathValue(const App::ObjectIdentifier &path) const; @@ -552,7 +552,7 @@ public: /** Value Constructor * Construct with explicit Values */ - PropertyFloatConstraint(void); + PropertyFloatConstraint(); /** * A destructor. @@ -604,14 +604,14 @@ public: */ void setConstraints(const Constraints* sConstrain); /// get the constraint struct - const Constraints* getConstraints(void) const; + const Constraints* getConstraints() const; //@} double getMinimum() const; double getMaximum() const; double getStepSize() const; - virtual const char* getEditorName(void) const + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyFloatConstraintItem"; } virtual void setPyObject(PyObject *); @@ -630,9 +630,9 @@ class AppExport PropertyPrecision: public PropertyFloatConstraint { TYPESYSTEM_HEADER(); public: - PropertyPrecision(void); + PropertyPrecision(); virtual ~PropertyPrecision(); - virtual const char* getEditorName(void) const + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyPrecisionItem"; } }; @@ -655,10 +655,10 @@ public: */ virtual ~PropertyFloatList(); - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyFloatListItem"; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; @@ -666,9 +666,9 @@ public: virtual void SaveDocFile (Base::Writer &writer) const override; virtual void RestoreDocFile(Base::Reader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: double getPyValue(PyObject *item) const override; @@ -688,7 +688,7 @@ public: * A constructor. * A more elaborate description of the constructor. */ - PropertyString(void); + PropertyString(); /** * A destructor. @@ -698,21 +698,21 @@ public: virtual void setValue(const char* sString); void setValue(const std::string &sString); - const char* getValue(void) const; - const std::string& getStrValue(void) const + const char* getValue() const; + const std::string& getStrValue() const { return _cValue; } - bool isEmpty(void){return _cValue.empty();} + bool isEmpty(){return _cValue.empty();} - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyStringItem"; } - virtual PyObject *getPyObject(void); + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyStringItem"; } + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; void setPathValue(const App::ObjectIdentifier &path, const boost::any &value); const boost::any getPathValue(const App::ObjectIdentifier &path) const; @@ -741,7 +741,7 @@ public: * A constructor. * A more elaborate description of the constructor. */ - PropertyUUID(void); + PropertyUUID(); /** * A destructor. @@ -753,19 +753,19 @@ public: void setValue(const Base::Uuid &); void setValue(const char* sString); void setValue(const std::string &sString); - const std::string& getValueStr(void) const; - const Base::Uuid& getValue(void) const; + const std::string& getValueStr() const; + const Base::Uuid& getValue() const; //virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyStringItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual bool isSame(const Property &other) const { if (&other == this) @@ -786,9 +786,9 @@ class AppExport PropertyFont : public PropertyString TYPESYSTEM_HEADER(); public: - PropertyFont(void); + PropertyFont(); virtual ~PropertyFont(); - virtual const char* getEditorName(void) const + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyFontItem"; } virtual bool isSame(const Property &other) const { @@ -821,18 +821,18 @@ public: void setValues(const std::list&); using inherited::setValues; - virtual const char* getEditorName(void) const override + virtual const char* getEditorName() const override { return "Gui::PropertyEditor::PropertyStringListItem"; } - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: std::string getPyValue(PyObject *item) const override; @@ -851,7 +851,7 @@ public: * A constructor. * A more elaborate description of the constructor. */ - PropertyBool(void); + PropertyBool(); /** * A destructor. @@ -860,20 +860,20 @@ public: virtual ~PropertyBool(); void setValue(bool lValue); - bool getValue(void) const; + bool getValue() const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyBoolItem"; } + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyBoolItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const{return sizeof(bool);} + virtual unsigned int getMemSize () const{return sizeof(bool);} void setPathValue(const App::ObjectIdentifier &path, const boost::any &value); const boost::any getPathValue(const App::ObjectIdentifier &path) const; @@ -901,15 +901,15 @@ public: PropertyBoolList(); virtual ~PropertyBoolList(); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setPyObject(PyObject *) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: bool getPyValue(PyObject *) const override; @@ -944,20 +944,20 @@ public: /** This method returns a string representation of the property */ - const Color &getValue(void) const; + const Color &getValue() const; - virtual const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyColorItem"; } + virtual const char* getEditorName() const { return "Gui::PropertyEditor::PropertyColorItem"; } - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const{return sizeof(Color);} + virtual unsigned int getMemSize () const{return sizeof(Color);} virtual bool isSame(const Property &other) const { if (&other == this) @@ -988,7 +988,7 @@ public: */ virtual ~PropertyColorList(); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; @@ -996,9 +996,9 @@ public: virtual void SaveDocFile (Base::Writer &writer) const override; virtual void RestoreDocFile(Base::Reader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; protected: Color getPyValue(PyObject *) const override; @@ -1037,20 +1037,20 @@ public: /** This method returns a string representation of the property */ - const Material &getValue(void) const; + const Material &getValue() const; - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); - virtual const char* getEditorName(void) const; + virtual const char* getEditorName() const; - virtual Property *Copy(void) const; + virtual Property *Copy() const; virtual void Paste(const Property &from); - virtual unsigned int getMemSize (void) const{return sizeof(_cMat);} + virtual unsigned int getMemSize () const{return sizeof(_cMat);} virtual bool isSame(const Property &other) const { if (&other == this) @@ -1083,7 +1083,7 @@ public: */ virtual ~PropertyMaterialList(); - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void Save(Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; @@ -1091,11 +1091,11 @@ public: virtual void SaveDocFile(Base::Writer &writer) const override; virtual void RestoreDocFile(Base::Reader &reader) override; - virtual const char* getEditorName(void) const override; + virtual const char* getEditorName() const override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize(void) const override; + virtual unsigned int getMemSize() const override; protected: Material getPyValue(PyObject *) const override; @@ -1111,15 +1111,15 @@ class AppExport PropertyPersistentObject: public PropertyString { TYPESYSTEM_HEADER_WITH_OVERRIDE(); typedef PropertyString inherited; public: - virtual PyObject *getPyObject(void) override; + virtual PyObject *getPyObject() override; virtual void setValue(const char* type) override; virtual void Save (Base::Writer &writer) const override; virtual void Restore(Base::XMLReader &reader) override; - virtual Property *Copy(void) const override; + virtual Property *Copy() const override; virtual void Paste(const Property &from) override; - virtual unsigned int getMemSize (void) const override; + virtual unsigned int getMemSize () const override; std::shared_ptr getObject() const { return _pObject; diff --git a/src/App/PropertyUnits.cpp b/src/App/PropertyUnits.cpp index 995aca9a21..6c422719ff 100644 --- a/src/App/PropertyUnits.cpp +++ b/src/App/PropertyUnits.cpp @@ -49,17 +49,17 @@ const PropertyQuantityConstraint::Constraints AngleStandard = {-360,360,1.0}; TYPESYSTEM_SOURCE(App::PropertyQuantity, App::PropertyFloat) -Base::Quantity PropertyQuantity::getQuantityValue(void) const +Base::Quantity PropertyQuantity::getQuantityValue() const { return Quantity(_dValue,_Unit); } -const char* PropertyQuantity::getEditorName(void) const +const char* PropertyQuantity::getEditorName() const { return "Gui::PropertyEditor::PropertyUnitItem"; } -PyObject *PropertyQuantity::getPyObject(void) +PyObject *PropertyQuantity::getPyObject() { return new QuantityPy (new Quantity(_dValue,_Unit)); } @@ -146,13 +146,13 @@ void PropertyQuantityConstraint::setConstraints(const Constraints* sConstrain) _ConstStruct = sConstrain; } -const char* PropertyQuantityConstraint::getEditorName(void) const +const char* PropertyQuantityConstraint::getEditorName() const { return "Gui::PropertyEditor::PropertyUnitConstraintItem"; } -const PropertyQuantityConstraint::Constraints* PropertyQuantityConstraint::getConstraints(void) const +const PropertyQuantityConstraint::Constraints* PropertyQuantityConstraint::getConstraints() const { return _ConstStruct; } diff --git a/src/App/PropertyUnits.h b/src/App/PropertyUnits.h index fef0d547bc..79bad26f50 100644 --- a/src/App/PropertyUnits.h +++ b/src/App/PropertyUnits.h @@ -45,21 +45,21 @@ class AppExport PropertyQuantity : public PropertyFloat TYPESYSTEM_HEADER(); public: - PropertyQuantity(void){} + PropertyQuantity(){} virtual ~PropertyQuantity(){} - Base::Quantity getQuantityValue(void) const; + Base::Quantity getQuantityValue() const; - virtual const char* getEditorName(void) const; + virtual const char* getEditorName() const; - virtual PyObject *getPyObject(void); + virtual PyObject *getPyObject(); virtual void setPyObject(PyObject *); void setUnit(const Base::Unit &u) {_Unit = u;} - const Base::Unit &getUnit(void) const {return _Unit;} + const Base::Unit &getUnit() const {return _Unit;} void setValue(double lValue) { PropertyFloat::setValue(lValue); } - double getValue(void) const { return PropertyFloat::getValue(); } + double getValue() const { return PropertyFloat::getValue(); } virtual void setPathValue(const App::ObjectIdentifier &path, const boost::any &value); virtual const boost::any getPathValue(const App::ObjectIdentifier &path) const; @@ -85,7 +85,7 @@ class AppExport PropertyQuantityConstraint : public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyQuantityConstraint(void):_ConstStruct(nullptr){} + PropertyQuantityConstraint():_ConstStruct(nullptr){} virtual ~PropertyQuantityConstraint(){} /// Constraint methods @@ -104,14 +104,14 @@ public: */ void setConstraints(const Constraints* sConstrain); /// get the constraint struct - const Constraints* getConstraints(void) const; + const Constraints* getConstraints() const; //@} double getMinimum() const; double getMaximum() const; double getStepSize() const; - virtual const char* getEditorName(void) const; + virtual const char* getEditorName() const; virtual void setPyObject(PyObject *); @@ -128,7 +128,7 @@ class AppExport PropertyAcceleration: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyAcceleration(void); + PropertyAcceleration(); virtual ~PropertyAcceleration() {} }; @@ -141,9 +141,9 @@ class AppExport PropertyAngle: public PropertyQuantityConstraint TYPESYSTEM_HEADER(); public: - PropertyAngle(void); + PropertyAngle(); virtual ~PropertyAngle() {} - virtual const char *getEditorName(void) const { return "Gui::PropertyEditor::PropertyAngleItem"; } + virtual const char *getEditorName() const { return "Gui::PropertyEditor::PropertyAngleItem"; } }; /** Area property @@ -155,7 +155,7 @@ class AppExport PropertyArea: public PropertyQuantityConstraint TYPESYSTEM_HEADER(); public: - PropertyArea(void); + PropertyArea(); virtual ~PropertyArea() {} }; @@ -168,7 +168,7 @@ class AppExport PropertyDistance: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyDistance(void); + PropertyDistance(); virtual ~PropertyDistance() {} }; @@ -181,7 +181,7 @@ class AppExport PropertyElectricPotential: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyElectricPotential(void); + PropertyElectricPotential(); virtual ~PropertyElectricPotential() {} }; @@ -194,7 +194,7 @@ class AppExport PropertyFrequency: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyFrequency(void); + PropertyFrequency(); virtual ~PropertyFrequency() {} }; @@ -207,7 +207,7 @@ class AppExport PropertyForce: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyForce(void); + PropertyForce(); virtual ~PropertyForce() {} }; @@ -220,7 +220,7 @@ class AppExport PropertyLength: public PropertyQuantityConstraint TYPESYSTEM_HEADER(); public: - PropertyLength(void); + PropertyLength(); virtual ~PropertyLength() {} }; @@ -233,7 +233,7 @@ class AppExport PropertyPressure: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyPressure(void); + PropertyPressure(); virtual ~PropertyPressure() {} }; @@ -246,7 +246,7 @@ class AppExport PropertySpeed: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertySpeed(void); + PropertySpeed(); virtual ~PropertySpeed() {} }; @@ -259,7 +259,7 @@ class AppExport PropertyStiffness: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyStiffness(void); + PropertyStiffness(); virtual ~PropertyStiffness() {} }; @@ -272,7 +272,7 @@ class AppExport PropertyVacuumPermittivity: public PropertyQuantity TYPESYSTEM_HEADER(); public: - PropertyVacuumPermittivity(void); + PropertyVacuumPermittivity(); virtual ~PropertyVacuumPermittivity() {} }; @@ -285,7 +285,7 @@ class AppExport PropertyVolume: public PropertyQuantityConstraint TYPESYSTEM_HEADER(); public: - PropertyVolume(void); + PropertyVolume(); virtual ~PropertyVolume() {} }; diff --git a/src/App/TransactionalObject.cpp b/src/App/TransactionalObject.cpp index 7235d10d44..d1b8fb77f7 100644 --- a/src/App/TransactionalObject.cpp +++ b/src/App/TransactionalObject.cpp @@ -32,11 +32,11 @@ using namespace App; PROPERTY_SOURCE_ABSTRACT(App::TransactionalObject, App::ExtensionContainer) -TransactionalObject::TransactionalObject(void) +TransactionalObject::TransactionalObject() { } -TransactionalObject::~TransactionalObject(void) +TransactionalObject::~TransactionalObject() { } diff --git a/src/App/TransactionalObject.h b/src/App/TransactionalObject.h index bd860835e3..d123aad7bd 100644 --- a/src/App/TransactionalObject.h +++ b/src/App/TransactionalObject.h @@ -40,7 +40,7 @@ class AppExport TransactionalObject : public App::ExtensionContainer public: /// Constructor - TransactionalObject(void); + TransactionalObject(); virtual ~TransactionalObject(); virtual bool isAttachedToDocument() const; virtual const char* detachFromDocument(); diff --git a/src/App/Transactions.cpp b/src/App/Transactions.cpp index 8d703dbb4b..2883774fb0 100644 --- a/src/App/Transactions.cpp +++ b/src/App/Transactions.cpp @@ -99,7 +99,7 @@ static std::atomic _TransactionID; int Transaction::getNewID() { int id = ++_TransactionID; - if(id) + if(id) return id; // wrap around? really? return ++_TransactionID; @@ -109,7 +109,7 @@ int Transaction::getLastID() { return _TransactionID; } -unsigned int Transaction::getMemSize (void) const +unsigned int Transaction::getMemSize () const { return 0; } @@ -124,7 +124,7 @@ void Transaction::Restore(Base::XMLReader &/*reader*/) assert(0); } -int Transaction::getID(void) const +int Transaction::getID() const { return transID; } @@ -404,7 +404,7 @@ void TransactionObject::addOrRemoveProperty(const Property* pcProp, bool add) } } -unsigned int TransactionObject::getMemSize (void) const +unsigned int TransactionObject::getMemSize () const { return 0; } diff --git a/src/App/Transactions.h b/src/App/Transactions.h index 2eea78ee0b..2d696f714a 100644 --- a/src/App/Transactions.h +++ b/src/App/Transactions.h @@ -65,17 +65,17 @@ public: // the utf-8 name of the transaction std::string Name; - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual void Save (Base::Writer &writer) const; /// This method is used to restore properties from an XML document. virtual void Restore(Base::XMLReader &reader); /// Return the transaction ID - int getID(void) const; + int getID() const; /// Generate a new unique transaction ID - static int getNewID(void); - static int getLastID(void); + static int getNewID(); + static int getLastID(); /// Returns true if the transaction list is empty; otherwise returns false. bool isEmpty() const; @@ -120,7 +120,7 @@ public: void setProperty(const Property* pcProp); void addOrRemoveProperty(const Property* pcProp, bool add); - virtual unsigned int getMemSize (void) const; + virtual unsigned int getMemSize () const; virtual void Save (Base::Writer &writer) const; /// This method is used to restore properties from an XML document. virtual void Restore(Base::XMLReader &reader); diff --git a/src/App/VRMLObject.cpp b/src/App/VRMLObject.cpp index 5994741f7b..0707f0d3eb 100644 --- a/src/App/VRMLObject.cpp +++ b/src/App/VRMLObject.cpp @@ -52,7 +52,7 @@ VRMLObject::~VRMLObject() { } -short VRMLObject::mustExecute(void) const +short VRMLObject::mustExecute() const { return 0; } diff --git a/src/App/VRMLObject.h b/src/App/VRMLObject.h index 33d78cfb09..e1423d4e30 100644 --- a/src/App/VRMLObject.h +++ b/src/App/VRMLObject.h @@ -37,18 +37,18 @@ class AppExport VRMLObject : public GeoFeature public: /// Constructor - VRMLObject(void); + VRMLObject(); virtual ~VRMLObject(); /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName() const { return "Gui::ViewProviderVRMLObject"; } - virtual DocumentObjectExecReturn *execute(void) { + virtual DocumentObjectExecReturn *execute() { return DocumentObject::StdReturn; } - virtual short mustExecute(void) const; - virtual PyObject *getPyObject(void); + virtual short mustExecute() const; + virtual PyObject *getPyObject(); virtual void Save (Base::Writer &writer) const; virtual void Restore(Base::XMLReader &reader); virtual void SaveDocFile (Base::Writer &writer) const;