From 3ffe983140ecb59966a3b929f8fbb196d452c2a1 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 9 Sep 2016 21:54:51 +0200 Subject: [PATCH] Small code cleanups --- rtengine/FTblockDN.cc | 4 ++-- rtengine/improccoordinator.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 8ff22864c..6c608cfc9 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -2106,7 +2106,7 @@ float ImProcFunctions::MadMax(float * DataList, int & max, int datalen) float ImProcFunctions::Mad(float * DataList, const int datalen) { - if(datalen <= 0) { // Avoid possible buffer underrun + if(datalen <= 1) { // Avoid possible buffer underrun return 0; } @@ -2135,7 +2135,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen) float ImProcFunctions::MadRgb(float * DataList, const int datalen) { - if(datalen <= 0) { // Avoid possible buffer underrun + if(datalen <= 1) { // Avoid possible buffer underrun return 0; } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 776484791..0fb0041f3 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -326,12 +326,13 @@ public: return imgsrc; } - struct { + struct DenoiseInfoStore { + DenoiseInfoStore () : valid(false) {} float chM; float max_r[9]; float max_b[9]; float ch_M[9]; - bool valid = false; + bool valid; } denoiseInfoStore;