[gtkmm] Demos: Use explicit keyword on single-parameter constructors.



commit d97e01cfa652fe052ef5aad57644254ad48d01c6
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Dec 12 09:54:25 2016 +0100

    Demos: Use explicit keyword on single-parameter constructors.
    
    Noticed by cppcheck.

 demos/gtk-demo/example_iconbrowser.cc |    2 +-
 demos/gtk-demo/textwidget.h           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/example_iconbrowser.cc b/demos/gtk-demo/example_iconbrowser.cc
index c8fd0a7..75964a3 100644
--- a/demos/gtk-demo/example_iconbrowser.cc
+++ b/demos/gtk-demo/example_iconbrowser.cc
@@ -85,7 +85,7 @@ private:
 class DetailDialog : public Gtk::Dialog
 {
 public:
-  DetailDialog(Gtk::Window& parent);
+  explicit DetailDialog(Gtk::Window& parent);
   ~DetailDialog() override;
 
   void set_image(const Glib::ustring& icon_name, const Glib::ustring& description);
diff --git a/demos/gtk-demo/textwidget.h b/demos/gtk-demo/textwidget.h
index 9a8d2d5..7ce6ae8 100644
--- a/demos/gtk-demo/textwidget.h
+++ b/demos/gtk-demo/textwidget.h
@@ -29,7 +29,7 @@
 class TextWidget : public Gtk::ScrolledWindow
 {
 public:
-  TextWidget(bool is_source);
+  explicit TextWidget(bool is_source);
   ~TextWidget() override;
 
   Glib::RefPtr<Gtk::TextBuffer> get_buffer();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]