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

@@ -699,7 +699,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
int height = tilebottom - tiletop;
LabImage * labco;
float **Lold;
float *LoldBuffer = NULL;
float *LoldBuffer = nullptr;
if(numtiles == 1) { // untiled processing => we can use output buffer for labco
labco = dst;
@@ -825,7 +825,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
for(int i = (tileheight + 1) / 2; i < tileheight; i++) {
delete [] varhue[i];
varhue[i] = NULL;
varhue[i] = nullptr;
}
} else { // reduce the varhue array to get faster access in following processing
for (int i = 0; i < (tileheight + 1) / 2; i++) {
@@ -915,21 +915,21 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
vari[1] = max(0.0001f, vari[1]);
vari[2] = max(0.0001f, vari[2]);
vari[3] = max(0.0001f, vari[3]);
float* noisevarlum = NULL; // we need a dummy to pass it to WaveletDenoiseAllL
float* noisevarlum = nullptr; // we need a dummy to pass it to WaveletDenoiseAllL
WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge);
}
ind = 1;
//Flat curve for Contrast=f(H) in levels
FlatCurve* ChCurve = NULL;//curve C=f(H)
FlatCurve* ChCurve = nullptr;//curve C=f(H)
bool Chutili = false;
ChCurve = new FlatCurve(params->wavelet.Chcurve);
if (!ChCurve || ChCurve->isIdentity()) {
if (ChCurve) {
delete ChCurve;
ChCurve = NULL;
ChCurve = nullptr;
}
} else {
Chutili = true;
@@ -952,14 +952,14 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
}
//Flat curve for H=f(H) in residual image
FlatCurve* hhCurve = NULL;//curve H=f(H)
FlatCurve* hhCurve = nullptr;//curve H=f(H)
bool hhutili = false;
hhCurve = new FlatCurve(params->wavelet.hhcurve);
if (!hhCurve || hhCurve->isIdentity()) {
if (hhCurve) {
delete hhCurve;
hhCurve = NULL;
hhCurve = nullptr;
}
} else {
hhutili = true;
@@ -1224,7 +1224,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
}
}
if(LoldBuffer != NULL) {
if(LoldBuffer != nullptr) {
delete [] LoldBuffer;
delete [] Lold;
}
@@ -1236,7 +1236,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
}
for (int i = 0; i < tileheight; i++)
if(varhue[i] != NULL) {
if(varhue[i] != nullptr) {
delete [] varhue[i];
}
@@ -1435,7 +1435,7 @@ float *ImProcFunctions::ContrastDR(float *Source, int skip, struct cont_params &
{
int n = W_L * H_L;
if(Contrast == NULL) {
if(Contrast == nullptr) {
Contrast = new float[n];
}
@@ -1489,7 +1489,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int skip, struct c
float *ucr = ContrastDR(Source, skip, cp, W_L, H_L, Compression, DetailBoost, max0, min0, ave, ah, bh, al, bl, factorx);
if(Compressed == NULL) {
if(Compressed == nullptr) {
Compressed = ucr;
}
@@ -1697,7 +1697,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
float max0 = 0.f;
float min0 = FLT_MAX;
if(contrast != 0.f || cp.tonemap && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step
if(contrast != 0.f || (cp.tonemap && cp.resena)) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step
#ifdef _RT_NESTED_OPENMP
#pragma omp parallel for reduction(+:avedbl) num_threads(wavNestedLevels) if(wavNestedLevels>1)
#endif
@@ -1771,7 +1771,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
float *koeLi[12];
float maxkoeLi[12];
float *koeLibuffer = NULL;
float *koeLibuffer = nullptr;
for(int y = 0; y < 12; y++) {
maxkoeLi[y] = 0.f; //9