Fix some coverity issues

This commit is contained in:
heckflosse
2017-06-12 23:57:18 +02:00
parent 69664430e2
commit a6cf24bc13
5 changed files with 31 additions and 23 deletions

View File

@@ -243,7 +243,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg,
n++;
}
r = cg[j] + r / n;
r = cg[j] + r / std::max(n, 1);
ar[j] = r;
} else {
@@ -368,7 +368,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo
n++;
}
r = g_mul * cg[j] + r / n;
r = g_mul * cg[j] + r / std::max(n, 1);
ar[jx] = r;
} else {