cppcheck: further fixes

This commit is contained in:
Ingo Weyrich
2019-08-06 22:10:38 +02:00
parent 96bf78fe87
commit 4fedfb2b26
10 changed files with 101 additions and 134 deletions

View File

@@ -329,8 +329,8 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
int tw = target->getWidth(), th = target->getHeight();
float thumb_ratio = float(std::max(sw, sh)) / float(std::min(sw, sh));
float target_ratio = float(std::max(tw, th)) / float(std::min(tw, th));
int cx = 0, cy = 0;
if (std::abs(thumb_ratio - target_ratio) > 0.01) {
int cx = 0, cy = 0;
if (thumb_ratio > target_ratio) {
// crop the height
int ch = th - (tw * float(sh) / float(sw));