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:
Flössie
2016-10-12 17:48:40 +02:00
parent 29d5329f3f
commit 0731975ff0
218 changed files with 2406 additions and 2406 deletions

View File

@@ -51,15 +51,15 @@ template<class T> T** allocArray (int W, int H)
}
#define HR_SCALE 2
StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL)
StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr)
{
hrmap[0] = NULL;
hrmap[1] = NULL;
hrmap[2] = NULL;
needhr = NULL;
embProfile = NULL;
idata = NULL;
hrmap[0] = nullptr;
hrmap[1] = nullptr;
hrmap[2] = nullptr;
needhr = nullptr;
embProfile = nullptr;
idata = nullptr;
}
StdImageSource::~StdImageSource ()
@@ -67,7 +67,7 @@ StdImageSource::~StdImageSource ()
delete idata;
if (hrmap[0] != NULL) {
if (hrmap[0] != nullptr) {
int dh = img->getH() / HR_SCALE;
freeArray<float>(hrmap[0], dh);
freeArray<float>(hrmap[1], dh);
@@ -178,7 +178,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch)
if (error) {
delete img;
img = NULL;
img = nullptr;
return error;
}
@@ -243,7 +243,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement
{
bool skipTransform = false;
cmsHPROFILE in = NULL;
cmsHPROFILE in = nullptr;
cmsHPROFILE out = iccStore->workingSpace (cmp.working);
if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") {
@@ -260,9 +260,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement
if (cmp.input != "(none)") {
in = iccStore->getProfile (cmp.input);
if (in == NULL && embedded) {
if (in == nullptr && embedded) {
in = embedded;
} else if (in == NULL) {
} else if (in == nullptr) {
if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) {
skipTransform = true;
} else {