Small code cleanups

This commit is contained in:
heckflosse
2016-09-09 21:54:51 +02:00
parent d564d17425
commit 3ffe983140
2 changed files with 5 additions and 4 deletions

View File

@@ -2106,7 +2106,7 @@ float ImProcFunctions::MadMax(float * DataList, int & max, int datalen)
float ImProcFunctions::Mad(float * DataList, const 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; return 0;
} }
@@ -2135,7 +2135,7 @@ float ImProcFunctions::Mad(float * DataList, const int datalen)
float ImProcFunctions::MadRgb(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; return 0;
} }

View File

@@ -326,12 +326,13 @@ public:
return imgsrc; return imgsrc;
} }
struct { struct DenoiseInfoStore {
DenoiseInfoStore () : valid(false) {}
float chM; float chM;
float max_r[9]; float max_r[9];
float max_b[9]; float max_b[9];
float ch_M[9]; float ch_M[9];
bool valid = false; bool valid;
} denoiseInfoStore; } denoiseInfoStore;