diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 48d1df191..81cc576c9 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -818,9 +818,7 @@ void Crop::update(int todo) //first put gamma TRC to 1 int cw = baseCrop->getWidth(); int ch = baseCrop->getHeight(); - Imagefloat* readyImg0 = NULL; - - readyImg0 = parent->ipf.workingtrc(baseCrop, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); + Imagefloat* readyImg0 = parent->ipf.workingtrc(baseCrop, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); #pragma omp parallel for for (int row = 0; row < ch; row++) { @@ -834,8 +832,7 @@ void Crop::update(int todo) delete readyImg0; //adjust gamma TRC - Imagefloat* readyImg = NULL; - readyImg = parent->ipf.workingtrc(baseCrop, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); + Imagefloat* readyImg = parent->ipf.workingtrc(baseCrop, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); #pragma omp parallel for for (int row = 0; row < ch; row++) { diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index ecc068bdb..2d6db3dd9 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -513,8 +513,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) int cw = oprevi->getWidth(); int ch = oprevi->getHeight(); // put gamma TRC to 1 - Imagefloat* readyImg0 = NULL; - readyImg0 = ipf.workingtrc(oprevi, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); + Imagefloat* readyImg0 = ipf.workingtrc(oprevi, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); #pragma omp parallel for for (int row = 0; row < ch; row++) { @@ -527,8 +526,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) delete readyImg0; //adjust TRC - Imagefloat* readyImg = NULL; - readyImg = ipf.workingtrc(oprevi, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); + Imagefloat* readyImg = ipf.workingtrc(oprevi, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); #pragma omp parallel for for (int row = 0; row < ch; row++) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 268c1e6df..d368eb0cd 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1638,7 +1638,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw if (params->defringe.enabled) if (execsharp) { lab->deleteLab(); - ImProcFunctions::defringecam (ncie);//defringe adapted to CIECAM + defringecam (ncie);//defringe adapted to CIECAM lab->reallocLab(); } @@ -1649,7 +1649,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw const bool hotbad = params->dirpyrequalizer.skinprotect != 0.0; lab->deleteLab(); - ImProcFunctions::badpixcam (ncie, artifact / scale, 5, 2, chrom, hotbad); //enabled remove artifacts for cbDL + badpixcam (ncie, artifact / scale, 5, 2, chrom, hotbad); //enabled remove artifacts for cbDL lab->reallocLab(); } @@ -1657,7 +1657,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw if (params->colorappearance.badpixsl > 0 && execsharp) { int mode = params->colorappearance.badpixsl; lab->deleteLab(); - ImProcFunctions::badpixcam (ncie, 3.0, 10, mode, 0, true);//for bad pixels CIECAM + badpixcam (ncie, 3.0, 10, mode, 0, true);//for bad pixels CIECAM lab->reallocLab(); } @@ -1666,17 +1666,17 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw buffers[0] = lab->L; buffers[1] = lab->a; buffers[2] = lab->b; - ImProcFunctions::impulsedenoisecam (ncie, buffers); //impulse adapted to CIECAM + impulsedenoisecam (ncie, buffers); //impulse adapted to CIECAM } if (params->sharpenMicro.enabled)if (execsharp) { - ImProcFunctions::MLmicrocontrastcam (ncie); + MLmicrocontrastcam (ncie); } if (params->sharpening.enabled) if (execsharp) { float **buffer = lab->L; // We can use the L-buffer from lab as buffer to save some memory - ImProcFunctions::sharpeningcam (ncie, buffer, showSharpMask); // sharpening adapted to CIECAM + sharpeningcam (ncie, buffer, showSharpMask); // sharpening adapted to CIECAM } //if(params->dirpyrequalizer.enabled) if(execsharp) { @@ -1732,7 +1732,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw if (epdEnabled && params->colorappearance.tonecie && algepd) { lab->deleteLab(); - ImProcFunctions::EPDToneMapCIE (ncie, a_w, c_, width, height, minQ, maxQ, Iterates, scale ); + EPDToneMapCIE (ncie, a_w, c_, width, height, minQ, maxQ, Iterates, scale ); lab->reallocLab(); } diff --git a/rtengine/lcp.h b/rtengine/lcp.h index aa6e24be8..2d9707907 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -153,7 +153,7 @@ public: Glib::ustring getDefaultCommonDirectory() const; private: - LCPStore(unsigned int _cache_size = 32); + explicit LCPStore(unsigned int _cache_size = 32); // Maps file name to profile as cache mutable Cache> cache; diff --git a/rtengine/pdaflinesfilter.h b/rtengine/pdaflinesfilter.h index 9837db5b6..b1f7bf650 100644 --- a/rtengine/pdaflinesfilter.h +++ b/rtengine/pdaflinesfilter.h @@ -27,7 +27,7 @@ namespace rtengine { class PDAFLinesFilter { public: - PDAFLinesFilter(RawImage *ri); + explicit PDAFLinesFilter(RawImage *ri); ~PDAFLinesFilter(); int mark(array2D &rawData, PixelsMap &bpMap); diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index b82a7d440..b58f0f866 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -5081,8 +5081,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) } if (keyFile.has_group("Exif")) { - std::vector keys = keyFile.get_keys("Exif"); - for (const auto& key : keyFile.get_keys("Exif")) { exif[key] = keyFile.get_string("Exif", key); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 9e23b51a3..bdb3ced19 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -900,8 +900,7 @@ private: int cw = baseImg->getWidth(); int ch = baseImg->getHeight(); // put gamma TRC to 1 - Imagefloat* readyImg0 = NULL; - readyImg0 = ipf.workingtrc(baseImg, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); + Imagefloat* readyImg0 = ipf.workingtrc(baseImg, cw, ch, -5, params.icm.workingProfile, 2.4, 12.92310); #pragma omp parallel for for (int row = 0; row < ch; row++) { @@ -915,8 +914,7 @@ private: delete readyImg0; //adjust TRC - Imagefloat* readyImg = NULL; - readyImg = ipf.workingtrc(baseImg, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); + Imagefloat* readyImg = ipf.workingtrc(baseImg, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope); #pragma omp parallel for for (int row = 0; row < ch; row++) { @@ -1258,7 +1256,6 @@ private: } } - Imagefloat* readyImg = nullptr; cmsHPROFILE jprof = nullptr; constexpr bool customGamma = false; constexpr bool useLCMS = false; @@ -1270,7 +1267,7 @@ private: // if Default gamma mode: we use the profile selected in the "Output profile" combobox; // gamma come from the selected profile, otherwise it comes from "Free gamma" tool - readyImg = ipf.lab2rgbOut (labView, cx, cy, cw, ch, params.icm); + Imagefloat* readyImg = ipf.lab2rgbOut (labView, cx, cy, cw, ch, params.icm); if (settings->verbose) { printf ("Output profile_: \"%s\"\n", params.icm.outputProfile.c_str()); diff --git a/rtgui/dirbrowser.h b/rtgui/dirbrowser.h index 62bc6f4a4..9d004f5f9 100644 --- a/rtgui/dirbrowser.h +++ b/rtgui/dirbrowser.h @@ -89,7 +89,7 @@ public: void updateVolumes (); void updateDirTree (const Gtk::TreeModel::iterator& iter); void updateDirTreeRoot (); - void winDirChanged (); + void winDirChanged () override; private: void addRoot (char letter); #endif diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index fa362a351..20416c549 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -261,7 +261,7 @@ void ExifPanel::addDirectory (const TagDirectory* dir, Gtk::TreeModel::Children Tag* t2 = (const_cast (dir))->getTagByIndex (j); const TagAttrib* currAttrib = t2->getAttrib(); - if (currAttrib && ((options.lastShowAllExif) || (!options.lastShowAllExif && currAttrib->action != AC_SYSTEM))) { + if (currAttrib && (options.lastShowAllExif || currAttrib->action != AC_SYSTEM)) { addSeparator(); hasContent = true; break; diff --git a/rtgui/filmsimulation.h b/rtgui/filmsimulation.h index f2c9af621..5f66b579e 100644 --- a/rtgui/filmsimulation.h +++ b/rtgui/filmsimulation.h @@ -11,7 +11,7 @@ class ClutComboBox : public MyComboBox { public: - ClutComboBox(const Glib::ustring &path); + explicit ClutComboBox(const Glib::ustring &path); //int fillFromDir (const Glib::ustring& path); int foundClutsCount() const; Glib::ustring getSelectedClut(); @@ -34,7 +34,7 @@ private: Glib::RefPtr m_model; ClutColumns m_columns; int count; - ClutModel(const Glib::ustring &path); + explicit ClutModel(const Glib::ustring &path); int parseDir (const Glib::ustring& path); }; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 08883708e..a271efc0a 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -11,7 +11,6 @@ using namespace rtengine::procparams; Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL"), false, true), lastmedianmap (false) { CurveListener::setMulti (true); - std::vector defaultCurve; std::vector milestones; nextmin = 0.; nextmax = 0.;