Some fixes as hinted by Coverity (#3558)

This commit is contained in:
Flössie
2017-06-05 10:58:14 +02:00
parent 982b291a64
commit 051670160b
9 changed files with 54 additions and 63 deletions

View File

@@ -397,12 +397,8 @@ void Crop::update (int todo)
MyTime t1aue, t2aue;
t1aue.set();
int crW, crH;
if(settings->leveldnv == 0) {
crW = 100;
crH = 100;
}
int crW = 100; // settings->leveldnv == 0
int crH = 100; // settings->leveldnv == 0
if(settings->leveldnv == 1) {
crW = 250;
@@ -1143,7 +1139,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte
ProcParams& params = parent->params;
parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh);
if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) {
// TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise
int dW = int(double(parent->fw) * 0.15 / (2 * skip));
@@ -1173,7 +1169,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte
orw = min(x2 - x1, parent->fw - orx);
orh = min(y2 - y1, parent->fh - ory);
}
PreviewProps cp (orx, ory, orw, orh, skip);
int orW, orH;