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:
@@ -29,16 +29,16 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true)
|
||||
{
|
||||
|
||||
infotext = "";
|
||||
cropgl = NULL;
|
||||
pmlistener = NULL;
|
||||
pmhlistener = NULL;
|
||||
focusGrabber = NULL;
|
||||
flawnOverWindow = NULL;
|
||||
mainCropWindow = NULL;
|
||||
previewHandler = NULL;
|
||||
cropgl = nullptr;
|
||||
pmlistener = nullptr;
|
||||
pmhlistener = nullptr;
|
||||
focusGrabber = nullptr;
|
||||
flawnOverWindow = nullptr;
|
||||
mainCropWindow = nullptr;
|
||||
previewHandler = nullptr;
|
||||
showClippedH = false;
|
||||
showClippedS = false;
|
||||
listener = NULL;
|
||||
listener = nullptr;
|
||||
|
||||
zoomPanel = Gtk::manage (new ZoomPanel (this));
|
||||
indClippedPanel = Gtk::manage (new IndicateClippedPanel (this));
|
||||
@@ -49,8 +49,8 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true)
|
||||
signal_size_allocate().connect( sigc::mem_fun(*this, &ImageArea::on_resized) );
|
||||
|
||||
dirty = false;
|
||||
ipc = NULL;
|
||||
iLinkedImageArea = NULL;
|
||||
ipc = nullptr;
|
||||
iLinkedImageArea = nullptr;
|
||||
}
|
||||
|
||||
ImageArea::~ImageArea ()
|
||||
@@ -114,7 +114,7 @@ rtengine::StagedImageProcessor* ImageArea::getImProcCoordinator() const
|
||||
void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_)
|
||||
{
|
||||
if( !ipc_ ) {
|
||||
focusGrabber = NULL;
|
||||
focusGrabber = nullptr;
|
||||
|
||||
for (auto cropWin : cropWins) {
|
||||
delete cropWin;
|
||||
@@ -123,7 +123,7 @@ void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_)
|
||||
cropWins.clear();
|
||||
|
||||
mainCropWindow->deleteColorPickers ();
|
||||
mainCropWindow->setObservedCropWin (NULL);
|
||||
mainCropWindow->setObservedCropWin (nullptr);
|
||||
}
|
||||
|
||||
ipc = ipc_;
|
||||
@@ -252,7 +252,7 @@ bool ImageArea::on_motion_notify_event (GdkEventMotion* event)
|
||||
cw->pointerMoved (event->state, event->x, event->y);
|
||||
} else if (flawnOverWindow) {
|
||||
flawnOverWindow->flawnOver(false);
|
||||
flawnOverWindow = NULL;
|
||||
flawnOverWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ bool ImageArea::on_leave_notify_event (GdkEventCrossing* event)
|
||||
{
|
||||
if (flawnOverWindow) {
|
||||
flawnOverWindow->flawnOver(false);
|
||||
flawnOverWindow = NULL;
|
||||
flawnOverWindow = nullptr;
|
||||
}
|
||||
|
||||
if (focusGrabber) {
|
||||
@@ -355,9 +355,9 @@ void ImageArea::unsubscribe()
|
||||
EditDataProvider::unsubscribe();
|
||||
|
||||
// Ask the Crops to free-up edit mode buffers
|
||||
mainCropWindow->setEditSubscriber(NULL);
|
||||
mainCropWindow->setEditSubscriber(nullptr);
|
||||
for (auto cropWin : cropWins) {
|
||||
cropWin->setEditSubscriber(NULL);
|
||||
cropWin->setEditSubscriber(nullptr);
|
||||
}
|
||||
|
||||
setToolHand();
|
||||
@@ -394,7 +394,7 @@ void ImageArea::grabFocus (CropWindow* cw)
|
||||
void ImageArea::unGrabFocus ()
|
||||
{
|
||||
|
||||
focusGrabber = NULL;
|
||||
focusGrabber = nullptr;
|
||||
}
|
||||
|
||||
void ImageArea::addCropWindow ()
|
||||
@@ -505,7 +505,7 @@ void ImageArea::cropWindowSelected (CropWindow* cw)
|
||||
void ImageArea::cropWindowClosed (CropWindow* cw)
|
||||
{
|
||||
|
||||
focusGrabber = NULL;
|
||||
focusGrabber = nullptr;
|
||||
std::list<CropWindow*>::iterator i = std::find (cropWins.begin(), cropWins.end(), cw);
|
||||
|
||||
if (i != cropWins.end()) {
|
||||
@@ -515,7 +515,7 @@ void ImageArea::cropWindowClosed (CropWindow* cw)
|
||||
if (!cropWins.empty()) {
|
||||
mainCropWindow->setObservedCropWin (cropWins.front());
|
||||
} else {
|
||||
mainCropWindow->setObservedCropWin (NULL);
|
||||
mainCropWindow->setObservedCropWin (nullptr);
|
||||
}
|
||||
|
||||
queue_draw ();
|
||||
|
Reference in New Issue
Block a user