Fix some new Coverity warnings
This commit is contained in:
@@ -789,18 +789,25 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag
|
||||
bool enableCA = false;
|
||||
|
||||
switch (mode) {
|
||||
case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE:
|
||||
enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->isCACorrectionAvailable();
|
||||
// no break on purpose
|
||||
case ImProcFunctions::TRANSFORM_HIGH_QUALITY:
|
||||
enableLCPDist = pLCPMap && params->lensProf.useDist;
|
||||
if (enableLCPCA) {
|
||||
enableLCPDist = false;
|
||||
case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE: {
|
||||
enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->isCACorrectionAvailable();
|
||||
}
|
||||
//no break on purpose
|
||||
|
||||
case ImProcFunctions::TRANSFORM_HIGH_QUALITY: {
|
||||
enableLCPDist = pLCPMap && params->lensProf.useDist;
|
||||
if (enableLCPCA) {
|
||||
enableLCPDist = false;
|
||||
}
|
||||
enableCA = enableLCPCA || needsCA();
|
||||
}
|
||||
//no break on purpose
|
||||
|
||||
default:
|
||||
case ImProcFunctions::TRANSFORM_PREVIEW: {
|
||||
enableLCPDist = pLCPMap && params->lensProf.useDist;
|
||||
break;
|
||||
}
|
||||
enableCA = enableLCPCA || needsCA();
|
||||
default: // ImProcFunctions::TRANSFORM_PREVIEW
|
||||
enableLCPDist = pLCPMap && params->lensProf.useDist;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!enableCA) {
|
||||
|
@@ -650,8 +650,8 @@ int rtengine::LCPProfile::filterBadFrames(LCPCorrectionMode mode, double maxAvgD
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->verbose) {
|
||||
std::printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered *100.f / count, maxAvgDevFac, count - filtered);
|
||||
if (settings->verbose && count) {
|
||||
std::printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered * 100.f / count, maxAvgDevFac, count - filtered);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,7 @@ void rtengine::LCPMapper::correctDistortion(double &x, double &y, int cx, int cy
|
||||
{
|
||||
x += cx;
|
||||
y += cy;
|
||||
|
||||
|
||||
if (isFisheye) {
|
||||
const double u = x * scale;
|
||||
const double v = y * scale;
|
||||
|
@@ -85,7 +85,7 @@ public:
|
||||
const rtexif::TagDirectory *getExifData() const { return NULL; }
|
||||
bool hasIPTC() const { return false; }
|
||||
const rtengine::procparams::IPTCPairs getIPTCData () const { return rtengine::procparams::IPTCPairs(); }
|
||||
struct tm getDateTime () const { struct tm ret; return ret; }
|
||||
tm getDateTime () const { return tm{}; }
|
||||
time_t getDateTimeAsTS() const { return time_t(-1); }
|
||||
int getISOSpeed() const { return iso; }
|
||||
double getFNumber() const { return fnumber; }
|
||||
|
Reference in New Issue
Block a user