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:
@@ -23,7 +23,7 @@
|
||||
BatchQueueEntryUpdater batchQueueEntryUpdater;
|
||||
|
||||
BatchQueueEntryUpdater::BatchQueueEntryUpdater ()
|
||||
: tostop(false), stopped(true), thread(NULL), qMutex(NULL)
|
||||
: tostop(false), stopped(true), thread(nullptr), qMutex(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void BatchQueueEntryUpdater::processThread ()
|
||||
break;
|
||||
}
|
||||
|
||||
rtengine::IImage8* img = NULL;
|
||||
rtengine::IImage8* img = nullptr;
|
||||
bool newBuffer = false;
|
||||
|
||||
if (current.thumbnail && current.pparams) {
|
||||
@@ -143,12 +143,12 @@ void BatchQueueEntryUpdater::processThread ()
|
||||
int neww = current.newh * current.ow / current.oh;
|
||||
guint8* img = new guint8 [current.newh * neww * 3];
|
||||
thumbInterp (current.oimg, current.ow, current.oh, img, neww, current.newh);
|
||||
current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : NULL);
|
||||
current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : nullptr);
|
||||
}
|
||||
|
||||
if(current.oimg) {
|
||||
delete[] current.oimg;
|
||||
current.oimg = NULL;
|
||||
current.oimg = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user