From e215ad4c6c94539007bfeaf1bda5e0233b69db56 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 11 Apr 2017 11:44:39 +0200 Subject: [PATCH] print LCP error messages about missing vignette/CA correction only when settings->verbose --- rtengine/lcp.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index d2d18b7d8..e367633f2 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -28,11 +28,18 @@ #include #endif +#include "settings.h" using namespace std; using namespace rtengine; +namespace rtengine { + +extern const Settings* settings; + +} + LCPModelCommon::LCPModelCommon() : foc_len_x(-1.0f), foc_len_y(-1.0f), @@ -603,7 +610,9 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float //printf("LCP mode=%i, dist: %g found frames: Fno %g-%g; FocLen %g-%g; Dist %g-%g with weight %g\n", mode, focusDist, pLow->aperture, pHigh->aperture, pLow->focLen, pHigh->focLen, pLow->focDist, pHigh->focDist, facLow); } else { - printf("Error: LCP file contained no %s parameters\n", mode == 0 ? "vignette" : mode == 1 ? "distortion" : "CA" ); + if (settings->verbose) { + printf("Error: LCP file contained no %s parameters\n", mode == 0 ? "vignette" : mode == 1 ? "distortion" : "CA" ); + } } }