Mesh: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:08:10 +01:00
parent e8f9c8a1d3
commit ec4d8a7500
4 changed files with 7 additions and 7 deletions

View File

@@ -185,14 +185,14 @@ private:
Py::Object importer(const Py::Tuple& args)
{
char* Name;
char* DocName=0;
char* DocName=nullptr;
if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
App::Document *pcDoc = 0;
App::Document *pcDoc = nullptr;
if (DocName) {
pcDoc = App::GetApplication().getDocument(DocName);
}
@@ -223,7 +223,7 @@ private:
int exportAmfCompressed( hGrp->GetBool("ExportAmfCompressed", true) );
static char *kwList[] = {"objectList", "filename", "tolerance",
"exportAmfCompressed", NULL};
"exportAmfCompressed", nullptr};
if (!PyArg_ParseTupleAndKeywords( args.ptr(), keywds.ptr(),
"Oet|dp",

View File

@@ -119,7 +119,7 @@ TaskDecimating::TaskDecimating()
{
widget = new DlgDecimating();
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
QPixmap(), widget->windowTitle(), false, 0);
QPixmap(), widget->windowTitle(), false, nullptr);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);

View File

@@ -36,7 +36,7 @@ class DlgDecimating : public QWidget
Q_OBJECT
public:
DlgDecimating(QWidget* parent = 0, Qt::WindowFlags fl = Qt::WindowFlags());
DlgDecimating(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgDecimating();
void setNumberOfTriangles(int);
double tolerance() const;

View File

@@ -63,7 +63,7 @@ Workbench::~Workbench()
class MeshInfoWatcher : public Gui::TaskView::TaskWatcher, public Gui::SelectionObserver
{
public:
MeshInfoWatcher() : TaskWatcher(0)
MeshInfoWatcher() : TaskWatcher(nullptr)
{
labelPoints = new QLabel();
labelPoints->setText(QString::fromLatin1("Number of points:"));
@@ -98,7 +98,7 @@ public:
grid->addWidget(numMax, 3, 1);
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
QPixmap(), QString::fromLatin1("Mesh info"), false, 0);
QPixmap(), QString::fromLatin1("Mesh info"), false, nullptr);
taskbox->groupLayout()->addWidget(box);
Content.push_back(taskbox);
}