[glom] cppcheck: Add missing explicit keyword.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] cppcheck: Add missing explicit keyword.
- Date: Sun, 1 Nov 2015 12:56:56 +0000 (UTC)
commit 42540001d702b366f73f17821f2e55d8dcd75da8
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 30 10:08:01 2015 +0100
cppcheck: Add missing explicit keyword.
glom/bakery/appwindow.h | 2 +-
glom/bakery/appwindow_withdoc.h | 2 +-
glom/bakery/dialog_offersave.h | 2 +-
glom/box_withbuttons.h | 2 +-
glom/libglom/data_structure/layout/layoutitem.h | 2 +-
glom/libglom/document/document.cc | 3 ++-
glom/mode_data/box_data_details.h | 2 +-
glom/mode_data/datawidget/combo.h | 2 +-
glom/mode_data/db_adddel/db_adddel.h | 2 +-
glom/mode_data/flowtablewithfields.h | 2 +-
glom/utility_widgets/adddel/adddel.h | 2 +-
11 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/glom/bakery/appwindow.h b/glom/bakery/appwindow.h
index 071217f..6bb51c3 100644
--- a/glom/bakery/appwindow.h
+++ b/glom/bakery/appwindow.h
@@ -51,7 +51,7 @@ public:
//a virtual base class so they would otherwise need to do that.
///Don't forget to call init() too.
- AppWindow(const Glib::ustring& appname = Glib::ustring());
+ explicit AppWindow(const Glib::ustring& appname = Glib::ustring());
virtual ~AppWindow();
diff --git a/glom/bakery/appwindow_withdoc.h b/glom/bakery/appwindow_withdoc.h
index 15ee15f..5678b9f 100644
--- a/glom/bakery/appwindow_withdoc.h
+++ b/glom/bakery/appwindow_withdoc.h
@@ -56,7 +56,7 @@ class AppWindow_WithDoc : public AppWindow
{
public:
///Don't forget to call init() too.
- AppWindow_WithDoc(const Glib::ustring& appname = ""); //TODO: appname when using get_derived_widget()
+ explicit AppWindow_WithDoc(const Glib::ustring& appname = ""); //TODO: appname when using
get_derived_widget()
virtual ~AppWindow_WithDoc();
diff --git a/glom/bakery/dialog_offersave.h b/glom/bakery/dialog_offersave.h
index a438a55..c71f736 100644
--- a/glom/bakery/dialog_offersave.h
+++ b/glom/bakery/dialog_offersave.h
@@ -30,7 +30,7 @@ namespace GlomBakery
class Dialog_OfferSave : public Gtk::MessageDialog
{
public:
- Dialog_OfferSave(const Glib::ustring& file_uri);
+ explicit Dialog_OfferSave(const Glib::ustring& file_uri);
virtual ~Dialog_OfferSave();
///Return values:
diff --git a/glom/box_withbuttons.h b/glom/box_withbuttons.h
index 5e0f700..d1fe6e6 100644
--- a/glom/box_withbuttons.h
+++ b/glom/box_withbuttons.h
@@ -46,7 +46,7 @@ public:
Box_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
///For use with libglademm's get_widget_derived():
- Box_WithButtons(BaseObjectType* cobject);
+ explicit Box_WithButtons(BaseObjectType* cobject);
virtual ~Box_WithButtons();
diff --git a/glom/libglom/data_structure/layout/layoutitem.h b/glom/libglom/data_structure/layout/layoutitem.h
index 76a16f5..fcae596 100644
--- a/glom/libglom/data_structure/layout/layoutitem.h
+++ b/glom/libglom/data_structure/layout/layoutitem.h
@@ -32,7 +32,7 @@ class LayoutItem : public TranslatableItem
public:
LayoutItem();
- LayoutItem(const LayoutItem& src);
+ explicit LayoutItem(const LayoutItem& src);
LayoutItem(LayoutItem&& src) = delete;
LayoutItem& operator=(const LayoutItem& src);
LayoutItem& operator=(LayoutItem&& src) = delete;
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 97a2c8d..8a2d3fd 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -4737,6 +4737,7 @@ static void handle_archive_error(archive* a)
std::cerr << " " << archive_error_string(a) << std::endl;
}
+// TODO: Use shared_ptr or unique_ptr?
// We use this to make sure that the C object is always released.
template <typename T_Object>
class ScopedArchivePtr
@@ -4792,7 +4793,7 @@ private:
T_Object* ptr_;
T_ReleaseFunc release_func_;
- ScopedArchiveEntryPtr(const ScopedArchivePtr<T_Object>&);
+ explicit ScopedArchiveEntryPtr(const ScopedArchivePtr<T_Object>&);
ScopedArchiveEntryPtr<T_Object>& operator=(const ScopedArchivePtr<T_Object>&);
};
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index 8072a23..af37848 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -37,7 +37,7 @@ namespace Glom
class Box_Data_Details : public Box_Data
{
public:
- Box_Data_Details(bool bWithNavButtons = true);
+ explicit Box_Data_Details(bool bWithNavButtons = true);
virtual ~Box_Data_Details();
bool init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform, const
Gnome::Gda::Value& primary_key_value);
diff --git a/glom/mode_data/datawidget/combo.h b/glom/mode_data/datawidget/combo.h
index ce3fc75..487e187 100644
--- a/glom/mode_data/datawidget/combo.h
+++ b/glom/mode_data/datawidget/combo.h
@@ -45,7 +45,7 @@ class ComboGlom
public:
///You must call set_layout_item() to specify the field type and formatting of the main column.
- ComboGlom(bool has_entry = false);
+ explicit ComboGlom(bool has_entry = false);
virtual ~ComboGlom();
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 5f248a8..fcc5a29 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -474,7 +474,7 @@ private:
class InnerIgnore
{
public:
- InnerIgnore(DbAddDel* pOuter);
+ explicit InnerIgnore(DbAddDel* pOuter);
~InnerIgnore();
private:
diff --git a/glom/mode_data/flowtablewithfields.h b/glom/mode_data/flowtablewithfields.h
index dde3c7c..9e4fd08 100644
--- a/glom/mode_data/flowtablewithfields.h
+++ b/glom/mode_data/flowtablewithfields.h
@@ -61,7 +61,7 @@ class FlowTableWithFields
public View_Composite_Glom
{
public:
- FlowTableWithFields(const Glib::ustring& table_name = Glib::ustring());
+ explicit FlowTableWithFields(const Glib::ustring& table_name = Glib::ustring());
virtual ~FlowTableWithFields();
///The table name is needed to discover details of relationships.
diff --git a/glom/utility_widgets/adddel/adddel.h b/glom/utility_widgets/adddel/adddel.h
index e749d85..87f037b 100644
--- a/glom/utility_widgets/adddel/adddel.h
+++ b/glom/utility_widgets/adddel/adddel.h
@@ -341,7 +341,7 @@ private:
class InnerIgnore
{
public:
- InnerIgnore(AddDel* pOuter);
+ explicit InnerIgnore(AddDel* pOuter);
~InnerIgnore();
protected:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]