Apply modernize-use-nullptr
Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
#include "multilangmgr.h"
|
||||
#include "rtimage.h"
|
||||
|
||||
CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(NULL),
|
||||
displayedCurve(0), flatSubGroup(0), diagonalSubGroup(0), cl(NULL), numberOfPackedCurve(0)
|
||||
CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(nullptr),
|
||||
displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0)
|
||||
{
|
||||
|
||||
// We set the label to the one provided as parameter, even if it's an empty string
|
||||
@@ -101,11 +101,11 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe
|
||||
}
|
||||
|
||||
default:
|
||||
return (static_cast<CurveEditor*>(NULL));
|
||||
return (static_cast<CurveEditor*>(nullptr));
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL; // to avoid complains from Gcc
|
||||
return nullptr; // to avoid complains from Gcc
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -134,13 +134,13 @@ void CurveEditorGroup::newLine()
|
||||
bool hasRelatedWidget = false;
|
||||
|
||||
for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) {
|
||||
if (curveEditors[i]->relatedWidget != NULL) {
|
||||
if (curveEditors[i]->relatedWidget != nullptr) {
|
||||
hasRelatedWidget = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) {
|
||||
if (curveEditors[i]->relatedWidget != NULL) {
|
||||
if (curveEditors[i]->relatedWidget != nullptr) {
|
||||
headerBox->pack_end (*curveEditors[i]->relatedWidget, Gtk::PACK_EXPAND_WIDGET, 2);
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ void CurveEditorGroup::curveTypeToggled(CurveEditor* ce)
|
||||
}
|
||||
} else {
|
||||
// The button is now released, so we have to hide this CurveEditor
|
||||
displayedCurve = 0;
|
||||
displayedCurve = nullptr;
|
||||
}
|
||||
|
||||
ce->subGroup->switchGUI();
|
||||
@@ -382,8 +382,8 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce)
|
||||
|
||||
CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0)
|
||||
{
|
||||
leftBar = NULL;
|
||||
bottomBar = NULL;
|
||||
leftBar = nullptr;
|
||||
bottomBar = nullptr;
|
||||
}
|
||||
|
||||
CurveEditorSubGroup::~CurveEditorSubGroup()
|
||||
|
Reference in New Issue
Block a user