Fix some coverity and cppcheck issues

This commit is contained in:
heckflosse
2017-06-18 18:40:40 +02:00
parent ae67344f16
commit 8aff354df9
14 changed files with 30 additions and 27 deletions

View File

@@ -184,7 +184,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg,
n++;
}
b = cg[j] + b / n;
b = cg[j] + b / std::max(1, n);
ab[j] = b;
} else {
// linear R-G interp. horizontally
@@ -309,7 +309,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo
n++;
}
b = g_mul * cg[j] + b / n;
b = g_mul * cg[j] + b / std::max(1, n);
ab[jx] = b;
} else {
// linear R-G interp. horizontally