Core: modernize C++: redundant void arg

This commit is contained in:
wmayer
2023-08-05 00:21:01 +02:00
committed by wwmayer
parent d37099fcbf
commit 702f3b4ddd
10 changed files with 20 additions and 20 deletions

View File

@@ -1241,7 +1241,7 @@ ParameterManager * Application::GetParameterSet(const char* sName) const
}
const std::map<std::string,Base::Reference<ParameterManager>> &
Application::GetParameterSetList(void) const
Application::GetParameterSetList() const
{
return mpcPramManager;
}

View File

@@ -332,7 +332,7 @@ public:
Base::Reference<ParameterGrp> GetParameterGroupByPath(const char* sName);
ParameterManager * GetParameterSet(const char* sName) const;
const std::map<std::string,Base::Reference<ParameterManager>> & GetParameterSetList(void) const;
const std::map<std::string,Base::Reference<ParameterManager>> & GetParameterSetList() const;
void AddParameterSet(const char* sName);
void RemoveParameterSet(const char* sName);
//@}

View File

@@ -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 << "<StringHasher at " << getStringHasherPtr() << ">";
@@ -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());
}

View File

@@ -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:

View File

@@ -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. */

View File

@@ -214,7 +214,7 @@ public:
}
private:
void unitChanged(void)
void unitChanged()
{
int userSchema = getWindowParameter()->GetInt("UserSchema", 0);
auto actions = menu()->actions();

View File

@@ -1100,7 +1100,7 @@ void NaviCubeDraggableCmd::activated(int iMsg)
auto view = qobject_cast<View3DInventor*>(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())) {

View File

@@ -63,7 +63,7 @@ void ViewProviderPlacement::onChanged(const App::Property* prop)
ViewProviderGeometryObject::onChanged(prop);
}
std::vector<std::string> ViewProviderPlacement::getDisplayModes(void) const
std::vector<std::string> ViewProviderPlacement::getDisplayModes() const
{
// add modes
std::vector<std::string> StrList;
@@ -126,7 +126,7 @@ bool ViewProviderPlacement::getDetailPath(
return true;
}
bool ViewProviderPlacement::isSelectable(void) const
bool ViewProviderPlacement::isSelectable() const
{
return true;
}

View File

@@ -52,7 +52,7 @@
#include <Gui/Application.h>
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"\

View File

@@ -371,20 +371,20 @@ PyMethodDef @self.export.Name@::Methods[] = {
{"@i.Name@",
+ if i.Keyword:
+ if i.Class:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_KEYWORDS|METH_CLASS,
= elif i.Static:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_KEYWORDS|METH_STATIC,
= else:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_KEYWORDS,
-
= elif i.Class:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_CLASS,
= elif i.Static:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) ()>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_STATIC,
= else:
reinterpret_cast<PyCFunction>( staticCallback_@i.Name@ ),