From 29a344aef15901b88bfa7ba216e1101170664b29 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:42:33 -0800 Subject: [PATCH] Fix some more compiler warnings --- rtgui/editorpanel.cc | 1 + rtgui/options.cc | 2 +- rtgui/profilestorecombobox.cc | 2 +- rtgui/rtscalable.cc | 2 +- rtgui/rtsurface.cc | 2 +- rtgui/toolpanelcoord.cc | 53 +++++++++++++++++++++++++++++++++++ 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index b03dab5e8..4dfa7b106 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -299,6 +299,7 @@ void setUserOnlyPermission(const Glib::RefPtr file, bool execute) .grfAccessPermissions = FILE_ALL_ACCESS, .grfAccessMode = GRANT_ACCESS, .grfInheritance = NO_INHERITANCE, + .Trustee = {}, }; BuildTrusteeWithSid(&(ea.Trustee), user_sid); PACL new_dacl_raw = nullptr; diff --git a/rtgui/options.cc b/rtgui/options.cc index c06711d3b..5c4625ceb 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -370,7 +370,7 @@ void Options::setDefaults() maxZoomLimit = MaxZoom::PERCENTS_1600; #ifdef _WIN32 // use windows setting for visibility of hidden files/folders - SHELLFLAGSTATE sft = { 0 }; + SHELLFLAGSTATE sft = { }; SHGetSettings(&sft, SSF_SHOWALLOBJECTS); fbShowHidden = sft.fShowAllObjects; #else diff --git a/rtgui/profilestorecombobox.cc b/rtgui/profilestorecombobox.cc index a6085e7a9..83a465a41 100644 --- a/rtgui/profilestorecombobox.cc +++ b/rtgui/profilestorecombobox.cc @@ -314,7 +314,7 @@ Gtk::TreeIter ProfileStoreComboBox::getRowFromLabel (const Glib::ustring &name) const ProfileStoreEntry *pse = currRow[methodColumns.profileStoreEntry]; if (pse->label == name) { - return std::move(currRow); + return currRow; } } } diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index 29d437256..70b578bca 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -87,7 +87,7 @@ Cairo::RefPtr RTScalable::loadSurfaceFromIcon(const Glib::u // Create surface from corresponding icon const auto pos = iconPath.find_last_of('.'); - if (pos >= 0 && pos < iconPath.length()) { + if (pos < iconPath.length()) { const auto fext = iconPath.substr(pos + 1, iconPath.length()).lowercase(); // Case where iconPath is a PNG file diff --git a/rtgui/rtsurface.cc b/rtgui/rtsurface.cc index a4015494a..ee6a83ff5 100644 --- a/rtgui/rtsurface.cc +++ b/rtgui/rtsurface.cc @@ -57,7 +57,7 @@ RTSurface::RTSurface(const Glib::ustring &fname) : // Create surface based on file extension const auto pos = fname.find_last_of('.'); - if (pos >= 0 && pos < fname.length()) { + if (pos < fname.length()) { const auto fext = fname.substr(pos + 1, fname.length()).lowercase(); // Case where fname is a PNG file diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 9b3bcf6ea..2e72577f5 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -40,126 +40,161 @@ using ToolTree = ToolPanelCoordinator::ToolTree; const std::vector EXPOSURE_PANEL_TOOLS = { { .id = Tool::TONE_CURVE, + .children = {}, }, { .id = Tool::SHADOWS_HIGHLIGHTS, + .children = {}, }, { .id = Tool::TONE_EQUALIZER, + .children = {}, }, { .id = Tool::EPD, + .children = {}, }, { .id = Tool::FATTAL, + .children = {}, }, { .id = Tool::PC_VIGNETTE, + .children = {}, }, { .id = Tool::GRADIENT, + .children = {}, }, { .id = Tool::L_CURVE, + .children = {}, }, }; const std::vector DETAILS_PANEL_TOOLS = { { .id = Tool::SPOT, + .children = {}, }, { .id = Tool::SHARPENING_TOOL, + .children = {}, }, { .id = Tool::LOCAL_CONTRAST, + .children = {}, }, { .id = Tool::SHARPEN_EDGE, + .children = {}, }, { .id = Tool::SHARPEN_MICRO, + .children = {}, }, { .id = Tool::IMPULSE_DENOISE, + .children = {}, }, { .id = Tool::DIR_PYR_DENOISE, + .children = {}, }, { .id = Tool::DEFRINGE_TOOL, + .children = {}, }, { .id = Tool::DIR_PYR_EQUALIZER, + .children = {}, }, { .id = Tool::DEHAZE, + .children = {}, }, }; const std::vector COLOR_PANEL_TOOLS = { { .id = Tool::WHITE_BALANCE, + .children = {}, }, { .id = Tool::VIBRANCE, + .children = {}, }, { .id = Tool::CH_MIXER, + .children = {}, }, { .id = Tool::BLACK_WHITE, + .children = {}, }, { .id = Tool::HSV_EQUALIZER, + .children = {}, }, { .id = Tool::FILM_SIMULATION, + .children = {}, }, { .id = Tool::FILM_NEGATIVE, + .children = {}, }, { .id = Tool::SOFT_LIGHT, + .children = {}, }, { .id = Tool::RGB_CURVES, + .children = {}, }, { .id = Tool::COLOR_TONING, + .children = {}, }, { .id = Tool::ICM, + .children = {}, }, }; const std::vector ADVANCED_PANEL_TOOLS = { { .id = Tool::RETINEX_TOOL, + .children = {}, }, { .id = Tool::COLOR_APPEARANCE, + .children = {}, }, { .id = Tool::WAVELET, + .children = {}, }, }; const std::vector LOCALLAB_PANEL_TOOLS = { { .id = Tool::LOCALLAB, + .children = {}, }, }; const std::vector TRANSFORM_PANEL_TOOLS = { { .id = Tool::CROP_TOOL, + .children = {}, }, { .id = Tool::RESIZE_TOOL, .children = { { .id = Tool::PR_SHARPENING, + .children = {}, }, }, }, @@ -168,21 +203,27 @@ const std::vector TRANSFORM_PANEL_TOOLS = { .children = { { .id = Tool::ROTATE, + .children = {}, }, { .id = Tool::PERSPECTIVE, + .children = {}, }, { .id = Tool::LENS_PROF, + .children = {}, }, { .id = Tool::DISTORTION, + .children = {}, }, { .id = Tool::CA_CORRECTION, + .children = {}, }, { .id = Tool::VIGNETTING, + .children = {}, }, }, }, @@ -195,15 +236,19 @@ const std::vector RAW_PANEL_TOOLS = { { { .id = Tool::BAYER_PROCESS, + .children = {}, }, { .id = Tool::BAYER_RAW_EXPOSURE, + .children = {}, }, { .id = Tool::BAYER_PREPROCESS, + .children = {}, }, { .id = Tool::RAW_CA_CORRECTION, + .children = {}, }, }, }, @@ -214,30 +259,38 @@ const std::vector RAW_PANEL_TOOLS = { { { .id = Tool::XTRANS_PROCESS, + .children = {}, }, { .id = Tool::XTRANS_RAW_EXPOSURE, + .children = {}, }, }, }, }, { .id = Tool::RAW_EXPOSURE, + .children = {}, }, { .id = Tool::PREPROCESS_WB, + .children = {}, }, { .id = Tool::PREPROCESS, + .children = {}, }, { .id = Tool::DARKFRAME_TOOL, + .children = {}, }, { .id = Tool::FLATFIELD_TOOL, + .children = {}, }, { .id = Tool::PD_SHARPENING, + .children = {}, }, };