diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 058385e64f..5601844e76 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1241,7 +1241,7 @@ ParameterManager * Application::GetParameterSet(const char* sName) const } const std::map> & -Application::GetParameterSetList(void) const +Application::GetParameterSetList() const { return mpcPramManager; } diff --git a/src/App/Application.h b/src/App/Application.h index a1616bad1a..45868f018b 100644 --- a/src/App/Application.h +++ b/src/App/Application.h @@ -332,7 +332,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); //@} diff --git a/src/App/StringHasherPyImp.cpp b/src/App/StringHasherPyImp.cpp index cdf3aea9a3..e03c007e9d 100644 --- a/src/App/StringHasherPyImp.cpp +++ b/src/App/StringHasherPyImp.cpp @@ -30,7 +30,7 @@ using namespace App; // returns a string which represent the object e.g. when printed in python -std::string StringHasherPy::representation(void) const +std::string StringHasherPy::representation() const { std::ostringstream str; str << ""; @@ -106,15 +106,15 @@ PyObject* StringHasherPy::getID(PyObject *args) }PY_CATCH; } -Py::Int StringHasherPy::getCount(void) const { +Py::Int StringHasherPy::getCount() const { return Py::Int((long)getStringHasherPtr()->count()); } -Py::Int StringHasherPy::getSize(void) const { +Py::Int StringHasherPy::getSize() const { return Py::Int((long)getStringHasherPtr()->size()); } -Py::Boolean StringHasherPy::getSaveAll(void) const { +Py::Boolean StringHasherPy::getSaveAll() const { return Py::Boolean(getStringHasherPtr()->getSaveAll()); } @@ -122,7 +122,7 @@ void StringHasherPy::setSaveAll(Py::Boolean value) { getStringHasherPtr()->setSaveAll(value); } -Py::Int StringHasherPy::getThreshold(void) const { +Py::Int StringHasherPy::getThreshold() const { return Py::Int((long)getStringHasherPtr()->getThreshold()); } diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 111ad493a2..ccb3979122 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -297,7 +297,7 @@ public: protected: void activated(int iMsg) override; bool isActive() override; - Action * createAction(void) override; + Action * createAction() override; void languageChange() override; private: diff --git a/src/Gui/Language/Translator.h b/src/Gui/Language/Translator.h index 23d8e10573..a4608f0386 100644 --- a/src/Gui/Language/Translator.h +++ b/src/Gui/Language/Translator.h @@ -55,9 +55,9 @@ public: /** @name singleton stuff */ //@{ /// Creates an instance - static Translator* instance(void); + static Translator* instance(); /// Destroys the instance - static void destruct (void); + static void destruct (); //@} /** Activates the specified language \a lang if available. */ diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 61196609f8..0f6031e3bc 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -214,7 +214,7 @@ public: } private: - void unitChanged(void) + void unitChanged() { int userSchema = getWindowParameter()->GetInt("UserSchema", 0); auto actions = menu()->actions(); diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index b1d169e18f..27cb09f61f 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -1100,7 +1100,7 @@ void NaviCubeDraggableCmd::activated(int iMsg) auto view = qobject_cast(getMainWindow()->activeWindow()); view->getViewer()->getNaviCube()->setDraggable(iMsg == 1 ? true : false); } -bool NaviCubeDraggableCmd::isActive(void) +bool NaviCubeDraggableCmd::isActive() { Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { diff --git a/src/Gui/ViewProviderPlacement.cpp b/src/Gui/ViewProviderPlacement.cpp index c1ef25044a..a9ea023784 100644 --- a/src/Gui/ViewProviderPlacement.cpp +++ b/src/Gui/ViewProviderPlacement.cpp @@ -63,7 +63,7 @@ void ViewProviderPlacement::onChanged(const App::Property* prop) ViewProviderGeometryObject::onChanged(prop); } -std::vector ViewProviderPlacement::getDisplayModes(void) const +std::vector ViewProviderPlacement::getDisplayModes() const { // add modes std::vector StrList; @@ -126,7 +126,7 @@ bool ViewProviderPlacement::getDetailPath( return true; } -bool ViewProviderPlacement::isSelectable(void) const +bool ViewProviderPlacement::isSelectable() const { return true; } diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index cd4afd877b..bc9d7f8a59 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -52,7 +52,7 @@ #include -void PrintInitHelp(void); +void PrintInitHelp(); const char sBanner[] = "\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2023\n"\ "FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n"\ diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index b2d4b615ed..00bb83fa55 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -371,20 +371,20 @@ PyMethodDef @self.export.Name@::Methods[] = { {"@i.Name@", + if i.Keyword: + if i.Class: - reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), + reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), METH_VARARGS|METH_KEYWORDS|METH_CLASS, = elif i.Static: - reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), + reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), METH_VARARGS|METH_KEYWORDS|METH_STATIC, = else: - reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), + reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), METH_VARARGS|METH_KEYWORDS, - = elif i.Class: - reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), + reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), METH_VARARGS|METH_CLASS, = elif i.Static: - reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), + reinterpret_cast(reinterpret_cast( staticCallback_@i.Name@ )), METH_VARARGS|METH_STATIC, = else: reinterpret_cast( staticCallback_@i.Name@ ),