Sheet: modernize C++: redundant void arg

This commit is contained in:
wmayer
2023-08-05 14:27:16 +02:00
committed by wwmayer
parent 899932cec0
commit ca84a0662d
14 changed files with 25 additions and 25 deletions

View File

@@ -1011,7 +1011,7 @@ App::Color Cell::decodeColor(const std::string & color, const App::Color & defau
}
//roughly based on Spreadsheet/Gui/SheetModel.cpp
std::string Cell::getFormattedQuantity(void)
std::string Cell::getFormattedQuantity()
{
std::string result;
QString qFormatted;

View File

@@ -31,7 +31,7 @@
using namespace Spreadsheet;
// returns a string which represents the object e.g. when printed in python
std::string PropertyRowHeightsPy::representation(void) const
std::string PropertyRowHeightsPy::representation() const
{
return std::string("<PropertyRowHeights object>");
}

View File

@@ -286,7 +286,7 @@ PropertySheet::~PropertySheet()
clear();
}
App::Property *PropertySheet::Copy(void) const
App::Property *PropertySheet::Copy() const
{
return new PropertySheet(*this);
}

View File

@@ -65,7 +65,7 @@ public:
void afterRestore() override;
void onContainerRestored() override;
Property *Copy(void) const override;
Property *Copy() const override;
void Paste(const Property &from) override;
@@ -149,7 +149,7 @@ public:
void removeColumns(int col, int count);
unsigned int getMemSize (void) const override;
unsigned int getMemSize () const override;
bool mergeCells(App::CellAddress from, App::CellAddress to);
@@ -171,7 +171,7 @@ public:
void recomputeDependencies(App::CellAddress key);
PyObject *getPyObject(void) override;
PyObject *getPyObject() override;
void setPyObject(PyObject *) override;
PyObject *getPyValue(PyObject *key);

View File

@@ -31,7 +31,7 @@
using namespace Spreadsheet;
// returns a string which represents the object e.g. when printed in python
std::string PropertySheetPy::representation(void) const
std::string PropertySheetPy::representation() const
{
return std::string("<PropertySheet object>");
}

View File

@@ -408,7 +408,7 @@ void Sheet::setCell(CellAddress address, const char * value)
* @returns The Python object.
*/
PyObject *Sheet::getPyObject(void)
PyObject *Sheet::getPyObject()
{
if (PythonObject.is(Py::_None())){
// ref counter is set to 1
@@ -901,7 +901,7 @@ void Sheet::updateBindings()
*
*/
DocumentObjectExecReturn *Sheet::execute(void)
DocumentObjectExecReturn *Sheet::execute()
{
updateBindings();
@@ -1057,7 +1057,7 @@ DocumentObjectExecReturn *Sheet::execute(void)
*
*/
short Sheet::mustExecute(void) const
short Sheet::mustExecute() const
{
if (!cellErrors.empty() || cells.isDirty())
return 1;

View File

@@ -58,10 +58,10 @@ class SpreadsheetExport PropertySpreadsheetQuantity : public App::PropertyQuanti
{
TYPESYSTEM_HEADER_WITH_OVERRIDE();
public:
PropertySpreadsheetQuantity(void){}
PropertySpreadsheetQuantity(){}
~PropertySpreadsheetQuantity() override{}
Property *Copy(void) const override;
Property *Copy() const override;
void Paste(const Property &from) override;
};
@@ -76,7 +76,7 @@ public:
~Sheet() override;
/// returns the type name of the ViewProvider
const char* getViewProviderName(void) const override {
const char* getViewProviderName() const override {
return "SpreadsheetGui::ViewProviderSheet";
}
@@ -177,9 +177,9 @@ public:
void getPropertyNamedList(std::vector<std::pair<const char*,App::Property*> > &List) const override;
short mustExecute(void) const override;
short mustExecute() const override;
App::DocumentObjectExecReturn *execute(void) override;
App::DocumentObjectExecReturn *execute() override;
bool getCellAddress(const App::Property *prop, App::CellAddress &address);

View File

@@ -38,7 +38,7 @@ using namespace Spreadsheet;
using namespace App;
// returns a string which represents the object e.g. when printed in python
std::string SheetPy::representation(void) const
std::string SheetPy::representation() const
{
return std::string("<Sheet object>");
}

View File

@@ -42,7 +42,7 @@
#include "Workbench.h"
// use a different name to CreateCommand()
void CreateSpreadsheetCommands(void);
void CreateSpreadsheetCommands();
void loadSpreadsheetResource()
{

View File

@@ -905,7 +905,7 @@ bool CmdCreateSpreadsheet::isActive()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void CreateSpreadsheetCommands(void)
void CreateSpreadsheetCommands()
{
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();

View File

@@ -64,7 +64,7 @@ public:
SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWidget* parent);
~SheetView() override;
const char *getName(void) const override {return "SheetView";}
const char *getName() const override {return "SheetView";}
bool onMsg(const char* pMsg,const char** ppReturn) override;
bool onHasMsg(const char* pMsg) const override;
@@ -96,7 +96,7 @@ public:
void deleteSelection();
PyObject *getPyObject(void) override;
PyObject *getPyObject() override;
void deleteSelf() override;

View File

@@ -67,7 +67,7 @@ void ViewProviderSheet::setDisplayMode(const char* ModeName)
ViewProviderDocumentObject::setDisplayMode(ModeName);
}
std::vector<std::string> ViewProviderSheet::getDisplayModes(void) const
std::vector<std::string> ViewProviderSheet::getDisplayModes() const
{
std::vector<std::string> StrList;
StrList.emplace_back("Spreadsheet");

View File

@@ -52,10 +52,10 @@ public:
~ViewProviderSheet() override;
void setDisplayMode(const char* ModeName) override;
bool useNewSelectionModel(void) const override {return false;}
bool useNewSelectionModel() const override {return false;}
std::vector<std::string> getDisplayModes() const override;
bool doubleClicked(void) override;
bool doubleClicked() override;
void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override;
Spreadsheet::Sheet* getSpreadsheetObject() const;
@@ -66,7 +66,7 @@ public:
bool setEdit(int ModNum) override;
bool isShow(void) const override { return true; }
bool isShow() const override { return true; }
Gui::MDIView *getMDIView() const override;

View File

@@ -30,7 +30,7 @@
using namespace SpreadsheetGui;
// returns a string which represents the object e.g. when printed in python
std::string ViewProviderSpreadsheetPy::representation(void) const
std::string ViewProviderSpreadsheetPy::representation() const
{
return std::string("<ViewProviderSpreadsheet object>");
}