Cppcheck: Fix issues related to explicit constructors

This commit is contained in:
heckflosse 2016-10-03 00:54:02 +02:00
parent ccd9002c3a
commit 3552fd4161
41 changed files with 45 additions and 45 deletions

View File

@ -37,7 +37,7 @@ public:
{
stopped = false;
}
StopWatch( const char* msg)
explicit StopWatch( const char* msg )
{
message = msg;
start();

View File

@ -143,7 +143,7 @@ private:
size_t size;
public:
AlignedBufferMP(size_t sizeP)
explicit AlignedBufferMP(size_t sizeP)
{
size = sizeP;
}

View File

@ -53,7 +53,7 @@ private:
public:
ColorTemp () : temp(-1.), green(-1.), equal (1.), method("Custom") {}
ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {}
explicit ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {}
ColorTemp (double t, double g, double e, const Glib::ustring &m);
ColorTemp (double mulr, double mulg, double mulb, double e);

View File

@ -35,7 +35,7 @@ struct Coord
Coord () = default;
Coord (const int x, const int y);
Coord (const Coord& other) = default;
Coord (const PolarCoord& other);
explicit Coord (const PolarCoord& other);
Coord& operator= (const Coord& other) = default;
Coord& operator= (const PolarCoord& other);
@ -66,7 +66,7 @@ struct PolarCoord
PolarCoord () = default;
PolarCoord (const double radius, const double angle);
PolarCoord (const PolarCoord& other) = default;
PolarCoord (const Coord& other);
explicit PolarCoord (const Coord& other);
PolarCoord& operator= (const PolarCoord& other) = default;
PolarCoord& operator= (const Coord& other);

View File

@ -63,7 +63,7 @@ public:
using Triple = std::array<double, 3>;
using Matrix = std::array<Triple, 3>;
DCPProfile(const Glib::ustring& filename);
explicit DCPProfile(const Glib::ustring& filename);
~DCPProfile();
explicit operator bool() const;

View File

@ -43,8 +43,8 @@ public:
ProfileContent (const ProfileContent& other);
ProfileContent& operator= (const rtengine::ProfileContent& other);
ProfileContent (const Glib::ustring& fileName);
ProfileContent (cmsHPROFILE hProfile);
explicit ProfileContent (const Glib::ustring& fileName);
explicit ProfileContent (cmsHPROFILE hProfile);
cmsHPROFILE toProfile () const;
};

View File

@ -89,7 +89,7 @@ public:
static const int MaxPersModelCount = 3000;
LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC!
LCPProfile(Glib::ustring fname);
explicit LCPProfile(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

View File

@ -50,7 +50,7 @@ protected:
void flush();
public:
PipetteBuffer(::EditDataProvider *dataProvider);
explicit PipetteBuffer(::EditDataProvider *dataProvider);
~PipetteBuffer();
/** @brief Getter to know if the pipette buffer is correctly filled */

View File

@ -102,7 +102,7 @@ class RawImage: public DCraw
{
public:
RawImage( const Glib::ustring &name );
explicit RawImage( const Glib::ustring &name );
~RawImage();
int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0);

View File

@ -68,7 +68,7 @@ protected:
void notifyListener (bool queueEmptied);
public:
BatchQueue (FileCatalog* aFileCatalog);
explicit BatchQueue (FileCatalog* aFileCatalog);
~BatchQueue ();
void addEntries (const std::vector<BatchQueueEntry*>& entries, bool head = false, bool save = true);

View File

@ -33,7 +33,7 @@ public:
static Cairo::RefPtr<Cairo::ImageSurface> headIcon;
static Cairo::RefPtr<Cairo::ImageSurface> tailIcon;
BatchQueueButtonSet (BatchQueueEntry* myEntry);
explicit BatchQueueButtonSet (BatchQueueEntry* myEntry);
};
#endif

View File

@ -55,7 +55,7 @@ class BatchQueuePanel : public Gtk::VBox,
public:
BatchQueuePanel (FileCatalog* aFileCatalog);
explicit BatchQueuePanel (FileCatalog* aFileCatalog);
void setParent (RTWindow* p)
{

View File

@ -48,7 +48,7 @@ protected:
public:
BatchToolPanelCoordinator (FilePanel* parent);
explicit BatchToolPanelCoordinator (FilePanel* parent);
// FileSelectionChangeListener interface
void selectionChanged (const std::vector<Thumbnail*>& selected);

View File

@ -37,7 +37,7 @@ protected:
std::vector<GradientMilestone> bgGradient;
public:
ColoredBar (eRTOrientation orient);
explicit ColoredBar (eRTOrientation orient);
void expose(Glib::RefPtr<Gdk::Window> destWindow);
void expose(Cairo::RefPtr<Cairo::ImageSurface> destSurface);

View File

@ -154,7 +154,7 @@ protected:
* This variable will be updated with actions in the
* dialogs.
*/
CurveEditorSubGroup(Glib::ustring& curveDir);
explicit CurveEditorSubGroup(Glib::ustring& curveDir);
Glib::ustring outputFile ();
Glib::ustring inputFile ();

View File

@ -463,7 +463,7 @@ protected:
} action; /// object mode only, ignored in Pipette mode
public:
EditSubscriber (EditType editType);
explicit EditSubscriber (EditType editType);
virtual ~EditSubscriber () {}
void setEditProvider(EditDataProvider *provider);

View File

@ -138,7 +138,7 @@ protected:
public:
EditorPanel (FilePanel* filePanel = NULL);
explicit EditorPanel (FilePanel* filePanel = NULL);
virtual ~EditorPanel ();
void open (Thumbnail* tmb, rtengine::InitialImage* isrc);

View File

@ -37,7 +37,7 @@ EditWindow* EditWindow::getInstance(RTWindow* p)
{
EditWindow editWnd;
EditWindowInstance(RTWindow* p) : editWnd(p)
explicit EditWindowInstance(RTWindow* p) : editWnd(p)
{
// Determine the other display and maximize the window on that
const Glib::RefPtr< Gdk::Window >& wnd = p->get_window();

View File

@ -42,7 +42,7 @@ public:
// Should only be created once, auto-creates window on correct display
static EditWindow* getInstance(RTWindow* p);
EditWindow (RTWindow* p);
explicit EditWindow (RTWindow* p);
void addEditorPanel (EditorPanel* ep, const std::string &name);
void remEditorPanel (EditorPanel* ep);

View File

@ -43,7 +43,7 @@ class DirEntry
public:
Glib::ustring fullName;
DirEntry (const Glib::ustring& n) : fullName (n) {}
explicit DirEntry (const Glib::ustring& n) : fullName (n) {}
bool operator< (DirEntry& other)
{

View File

@ -44,7 +44,7 @@ public:
static Cairo::RefPtr<Cairo::ImageSurface> colorLabelIcon_4;
static Cairo::RefPtr<Cairo::ImageSurface> colorLabelIcon_5;
FileThumbnailButtonSet (FileBrowserEntry* myEntry);
explicit FileThumbnailButtonSet (FileBrowserEntry* myEntry);
void setRank (int stars);
void setColorLabel (int colorlabel);
void setInTrash (bool inTrash);

View File

@ -79,7 +79,7 @@ public:
class ConnectionBlocker
{
public:
ConnectionBlocker (sigc::connection& connection) : connection (connection)
explicit ConnectionBlocker (sigc::connection& connection) : connection (connection)
{
wasBlocked = connection.block();
}
@ -101,7 +101,7 @@ private:
Gtk::Container *pC;
public:
ExpanderBox( Gtk::Container *p);
explicit ExpanderBox( Gtk::Container *p);
~ExpanderBox( )
{
delete pC;

View File

@ -144,7 +144,7 @@ protected:
public:
HistogramArea(FullModeListener *fml = NULL);
explicit HistogramArea(FullModeListener *fml = NULL);
~HistogramArea();
void renderHistogram ();

View File

@ -95,7 +95,7 @@ protected:
public:
History (bool bookmarkSupport = true);
explicit History (bool bookmarkSupport = true);
void setProfileChangeListener (ProfileChangeListener* tpc_)
{

View File

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

View File

@ -70,7 +70,7 @@ public:
PreviewModePanel* previewModePanel;
ImageArea* iLinkedImageArea; // used to set a reference to the Before image area, which is set when before/after view is enabled
ImageArea (ImageAreaPanel* p);
explicit ImageArea (ImageAreaPanel* p);
~ImageArea ();
void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_);

View File

@ -30,7 +30,7 @@ protected:
ImageArea* imageArea;
public:
IndicateClippedPanel (ImageArea* ia);
explicit IndicateClippedPanel (ImageArea* ia);
void buttonToggled ();

View File

@ -34,7 +34,7 @@ public:
int currTransform; // coarse rotation from RT, not from shot orientation
bool fromRaw;
InspectorBuffer(const Glib::ustring &imgagePath);
explicit InspectorBuffer(const Glib::ustring &imgagePath);
//~InspectorBuffer();
};

View File

@ -783,7 +783,7 @@ public:
bool exif;
bool iptc;
ParamsEdited (bool value = false);
explicit ParamsEdited (bool value = false);
void set (bool v);
void initFrom (const std::vector<rtengine::procparams::ProcParams>& src);

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;
public:
PartialPasteDlg (Glib::ustring title);
explicit PartialPasteDlg (Glib::ustring title);
void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL);

View File

@ -28,7 +28,7 @@ class PopUpToggleButton : public Gtk::ToggleButton, public PopUpCommon
{
public:
PopUpToggleButton (const Glib::ustring& label = "");
explicit PopUpToggleButton (const Glib::ustring& label = "");
void show ();
void set_tooltip_text (const Glib::ustring &text);
};

View File

@ -229,7 +229,7 @@ protected:
Gtk::Widget* getSoundPanel ();
public:
Preferences (RTWindow *rtwindow);
explicit Preferences (RTWindow *rtwindow);
~Preferences ();
void savePressed ();

View File

@ -47,7 +47,7 @@ protected:
Gtk::Image* iBC2, *igBC2;
public:
PreviewModePanel (ImageArea* ia);
explicit PreviewModePanel (ImageArea* ia);
~PreviewModePanel();
void toggleR ();

View File

@ -69,7 +69,7 @@ protected:
public:
ProfilePanel (bool readOnly = false);
explicit ProfilePanel (bool readOnly = false);
virtual ~ProfilePanel ();
void setProfileChangeListener (ProfileChangeListener* ppl)

View File

@ -108,7 +108,7 @@ public:
*
* @param entry Pointer to the ProfileStoreEntry object, be it a directory or a file
*/
ProfileStoreLabel(const ProfileStoreEntry *entry);
explicit ProfileStoreLabel(const ProfileStoreEntry *entry);
ProfileStoreLabel (const ProfileStoreLabel &other);
};

View File

@ -32,7 +32,7 @@ class PLDBridge : public rtengine::ProgressListener
rtengine::ProgressListener* pl;
public:
PLDBridge ( rtengine::ProgressListener* pb)
explicit PLDBridge ( rtengine::ProgressListener* pb)
: pl(pb) {}
// ProgressListener interface

View File

@ -55,7 +55,7 @@ protected:
void fillTemplateList ();
public:
RenameDialog (Gtk::Window* parent);
explicit RenameDialog (Gtk::Window* parent);
void initName (const Glib::ustring& iname, const CacheImageData* cid);
Glib::ustring getNewName ();
@ -79,7 +79,7 @@ protected:
void refreshTemplateList ();
public:
RenameTemplateEditor (Gtk::Window* parent);
explicit RenameTemplateEditor (Gtk::Window* parent);
Glib::ustring getSelectedTemplate ();

View File

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

View File

@ -46,7 +46,7 @@ private:
public:
Splash (Gtk::Window& parent, int maxtime);
Splash (Gtk::Window& parent);
explicit Splash (Gtk::Window& parent);
bool hasReleaseNotes()
{

View File

@ -107,7 +107,7 @@ public:
bool updatepriority;
eWithFilename withFilename;
ThumbBrowserEntryBase (const Glib::ustring& fname);
explicit ThumbBrowserEntryBase (const Glib::ustring& fname);
virtual ~ThumbBrowserEntryBase ();
void setParent (ThumbBrowserBase* l)

View File

@ -38,7 +38,7 @@ protected:
public:
ZoomPanel (ImageArea* iarea);
explicit ZoomPanel (ImageArea* iarea);
void zoomInClicked ();
void zoomOutClicked ();