modernize C++: use nullptr

This commit is contained in:
wmayer
2023-08-05 16:52:01 +02:00
committed by Chris Hennes
parent aa53596289
commit d244dcf2da
12 changed files with 242 additions and 137 deletions

View File

@@ -60,7 +60,7 @@ public:
explicit TreeWidget(const char *name, QWidget* parent=nullptr);
~TreeWidget() override;
static void setupResizableColumn(TreeWidget *tree=0);
static void setupResizableColumn(TreeWidget *tree=nullptr);
static void scrollItemToTop();
void selectAllInstances(const ViewProviderDocumentObject &vpd);
void selectLinkedObject(App::DocumentObject *linked);

View File

@@ -128,7 +128,7 @@ public:
*
* @see https://github.com/FreeCAD/FreeCAD/issues/8708
*/
static std::unique_ptr<UiLoader> newInstance(QObject *parent=0);
static std::unique_ptr<UiLoader> newInstance(QObject *parent=nullptr);
~UiLoader() override;

View File

@@ -3165,7 +3165,7 @@ std::map<std::string, App::Color> ViewProviderLink::getElementColors(const char
}
std::map<std::string, App::Color> ret;
for(const auto &v : colors) {
const char *pos = 0;
const char *pos = nullptr;
auto sobj = getObject()->resolve(v.first.c_str(),nullptr,nullptr,&pos);
if(!sobj || !pos)
continue;