Cppcheck: Fixed some issues found by Flössie during review of my changes

This commit is contained in:
heckflosse 2016-10-04 23:50:44 +02:00
parent 566d4c9822
commit e82b60cd03
9 changed files with 9 additions and 12 deletions

View File

@ -1677,10 +1677,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef
} }
delete labdn; delete labdn;
delete Lin;
if (Lin) {
delete Lin;
}
}//end of tile row }//end of tile row
}//end of tile loop }//end of tile loop

View File

@ -276,7 +276,7 @@ float LCPMapper::calcVignetteFac(int x, int y) const
+ 2.*aVig[0] * aVig[2] - 3.*param0Sqr * aVig[1]) * rsqr * rsqr)); + 2.*aVig[0] * aVig[2] - 3.*param0Sqr * aVig[1]) * rsqr * rsqr));
} }
LCPProfile::LCPProfile(Glib::ustring fname) LCPProfile::LCPProfile(const Glib::ustring &fname)
{ {
const int BufferSize = 8192; const int BufferSize = 8192;
char buf[BufferSize]; char buf[BufferSize];

View File

@ -89,7 +89,7 @@ public:
static const int MaxPersModelCount = 3000; static const int MaxPersModelCount = 3000;
LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC!
explicit LCPProfile(Glib::ustring fname); explicit LCPProfile(const Glib::ustring &fname);
void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames

View File

@ -18,7 +18,7 @@
*/ */
#include "ilabel.h" #include "ilabel.h"
ILabel::ILabel (Glib::ustring lab) : label(lab) {} ILabel::ILabel (const Glib::ustring &lab) : label(lab) {}
void ILabel::on_realize() void ILabel::on_realize()
{ {

View File

@ -27,7 +27,7 @@ class ILabel : public Gtk::DrawingArea
Glib::ustring label; Glib::ustring label;
public: public:
explicit ILabel (Glib::ustring lab); explicit ILabel (const Glib::ustring &lab);
bool on_expose_event(GdkEventExpose* event); bool on_expose_event(GdkEventExpose* event);
void on_realize(); void on_realize();
void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); void on_style_changed (const Glib::RefPtr<Gtk::Style>& style);

View File

@ -20,7 +20,7 @@
#include "multilangmgr.h" #include "multilangmgr.h"
#include "paramsedited.h" #include "paramsedited.h"
PartialPasteDlg::PartialPasteDlg (Glib::ustring title) PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title)
{ {
set_modal (true); set_modal (true);

View File

@ -132,7 +132,7 @@ public:
sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn;
public: public:
explicit PartialPasteDlg (Glib::ustring title); explicit PartialPasteDlg (const Glib::ustring &title);
void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL);

View File

@ -22,7 +22,7 @@
#include "rtimage.h" #include "rtimage.h"
extern Options options; extern Options options;
SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir)
{ {
set_title(M("GENERAL_SAVE")); set_title(M("GENERAL_SAVE"));

View File

@ -45,7 +45,7 @@ protected:
void putToQueueClicked (); void putToQueueClicked ();
public: public:
explicit SaveAsDialog (Glib::ustring initialDir); explicit SaveAsDialog (const Glib::ustring &initialDir);
Glib::ustring getFileName (); Glib::ustring getFileName ();
Glib::ustring getDirectory (); Glib::ustring getDirectory ();