diff --git a/rtengine/LUT.h b/rtengine/LUT.h index df95dde7f..2701c4ffc 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -169,6 +169,11 @@ public: { data = nullptr; reset(); +#if defined( __SSE2__ ) && defined( __x86_64__ ) + maxsv = ZEROV; + sizev = ZEROV; + sizeiv = _mm_setzero_si128(); +#endif } ~LUT() diff --git a/rtengine/coord2d.h b/rtengine/coord2d.h index f896cd0d0..bc030f22e 100644 --- a/rtengine/coord2d.h +++ b/rtengine/coord2d.h @@ -28,7 +28,7 @@ class Coord2D public: double x, y; Coord2D (double x_, double y_) : x(x_), y(y_) {} - Coord2D () {} + Coord2D () : x(0), y(0) {} void set (double x_, double y_) { x = x_; diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index 62765f812..43aa98480 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -407,6 +407,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : valid(false), baseline_exposure_offset(0.0) { + delta_info.hue_step = delta_info.val_step = look_info.hue_step = look_info.val_step = 0; constexpr int tiff_float_size = 4; enum class TagKey : int { diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index c71d7f98b..bc35b3c71 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -211,9 +211,12 @@ void dfInfo::updateRawImage() void dfInfo::updateBadPixelList( RawImage *df ) { + if(!df) { + return; + } const float threshold = 10.f / 8.f; - if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) { + if( df->getSensorType() == ST_BAYER || df->getSensorType() == ST_FUJI_XTRANS ) { std::vector badPixelsTemp; #pragma omp parallel diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 8ea663750..4e206e3bb 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -216,15 +216,19 @@ rtengine::ProfileContent::ProfileContent(const Glib::ustring& fileName) } fseek(f, 0, SEEK_END); - const long length = ftell(f); - fseek(f, 0, SEEK_SET); - char* d = new char[length + 1]; - fread(d, length, 1, f); - d[length] = 0; + long length = ftell(f); + if(length > 0) { + char* d = new char[length + 1]; + fseek(f, 0, SEEK_SET); + length = fread(d, length, 1, f); + d[length] = 0; + data.assign(d, length); + delete[] d; + } else { + data.clear(); + } fclose(f); - data.assign(d, length); - delete[] d; } rtengine::ProfileContent::ProfileContent(cmsHPROFILE hProfile) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 95c3848ba..fcbde90e4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5471,7 +5471,6 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu editID = pipetteBuffer->getEditID(); if (editID != EUID_None) { - editPipette = true; switch (pipetteBuffer->getDataProvider()->getCurrSubscriber()->getPipetteBufferType()) { case (BT_IMAGEFLOAT): @@ -5481,6 +5480,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu break; case (BT_SINGLEPLANE_FLOAT): + editPipette = true; editWhatever = pipetteBuffer->getSinglePlaneBuffer(); break; } diff --git a/rtgui/coarsepanel.cc b/rtgui/coarsepanel.cc index 63a9251fb..a201b1f7f 100644 --- a/rtgui/coarsepanel.cc +++ b/rtgui/coarsepanel.cc @@ -22,7 +22,7 @@ using namespace rtengine; using namespace rtengine::procparams; -CoarsePanel::CoarsePanel () : ToolPanel () +CoarsePanel::CoarsePanel () : ToolPanel (), oldhflip(false), oldvflip(false) { degree = 0; diff --git a/rtgui/exportpanel.h b/rtgui/exportpanel.h index db4431ca5..be6c9b4e3 100644 --- a/rtgui/exportpanel.h +++ b/rtgui/exportpanel.h @@ -76,8 +76,6 @@ protected: MyComboBoxText* raw_xtrans_method; Gtk::Button* btnFastExport; - Gtk::Button* btnExportLoadSettings; - Gtk::Button* btnExportSaveSettings; MySpinButton* MaxWidth; MySpinButton* MaxHeight; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index b4238f011..c026b63a8 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -125,8 +125,21 @@ void findOriginalEntries (const std::vector& entries) } -FileBrowser::FileBrowser () - : tbl(nullptr), numFiltered(0) +FileBrowser::FileBrowser () : + menuLabel(nullptr), + selectDF(nullptr), + thisIsDF(nullptr), + autoDF(nullptr), + selectFF(nullptr), + thisIsFF(nullptr), + autoFF(nullptr), + clearFromCache(nullptr), + clearFromCacheFull(nullptr), + colorLabel_actionData(nullptr), + bppcl(nullptr), + tbl(nullptr), + numFiltered(0), + exportPanel(nullptr) { session_id_ = 0; diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index ceab1c1d3..59655235f 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -38,7 +38,7 @@ Glib::RefPtr FileBrowserEntry::recentlySavedIcon; Glib::RefPtr FileBrowserEntry::enqueuedIcon; FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f) + : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), press_x(0), press_y(0), action_x(0), action_y(0), rot_deg(0.0), landscape(true), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f) { thumbnail = thm; diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 710450d90..0d10ba125 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -44,12 +44,16 @@ using namespace std; FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : filepanel(filepanel), selectedDirectoryId(1), + actionNextPrevious(NAV_NONE), listener(nullptr), fslistener(nullptr), + iatlistener(nullptr), hasValidCurrentEFS(false), filterPanel(nullptr), + exportPanel(nullptr), previewsToLoad(0), previewsLoaded(0), + modifierKey(0), coarsePanel(cp), toolBar(tb) { diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index fc1b0a1bd..7cae75d87 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr) +LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr), lastFill(false) { fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL"))); diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 79a0dc19f..0855ef03f 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -26,7 +26,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), isRaw(true) +LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), lcpFileChanged(false), useDistChanged(false), useVignChanged(false), useCAChanged(false), isRaw(true), lensgeomLcpFill(nullptr) { hbLCPFile = Gtk::manage(new Gtk::HBox()); diff --git a/rtgui/main.cc b/rtgui/main.cc index 0f4a96c8a..531c42291 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -415,7 +415,6 @@ void deleteProcParams(std::vector &pparam int processLineParams( int argc, char **argv ) { - unsigned errors = 0; for( int iArg = 1; iArg < argc; iArg++) { Glib::ustring currParam(argv[iArg]); @@ -472,5 +471,5 @@ int processLineParams( int argc, char **argv ) return 1; } - return errors > 0 ? -2 : 0; + return 0; } diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 210fb42f2..4da683b0c 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -21,7 +21,25 @@ #include #include -MyFlatCurve::MyFlatCurve () +MyFlatCurve::MyFlatCurve () : + clampedX(0.0), + clampedY(0.0), + deltaX(0.0), + deltaY(0.0), + distanceX(0.0), + distanceY(0.0), + ugpX(0.0), + ugpY(0.0), + leftTanX(0.0), + rightTanX(0.0), + preciseCursorX(0.0), + preciseCursorY(0.0), + minDistanceX(0.0), + minDistanceY(0.0), + deletedPointX(0.0), + leftTanHandle({0.0, 0.0}), + rightTanHandle({0.0, 0.0}), + draggingElement(false) { graphW = get_allocation().get_width() - RADIUS * 2;