[glom] Fixes for krazy2 warnings: Use of explicit and a non-const operator.



commit 32164085302ee422cc144352ab103dbb16dd24f8
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Dec 14 16:34:45 2009 +0100

    Fixes for krazy2 warnings: Use of explicit and a non-const operator.

 glom/bakery/busy_cursor.h                          |    4 ++--
 glom/utility_widgets/canvas/canvas_image_movable.h |    4 ++--
 glom/utility_widgets/canvas/canvas_text_movable.h  |    2 +-
 .../utility_widgets/filechooserdialog_saveextras.h |    2 +-
 glom/utility_widgets/flowtable.h                   |    2 +-
 glom/window_boxholder.h                            |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/glom/bakery/busy_cursor.h b/glom/bakery/busy_cursor.h
index 3c46680..98c9387 100644
--- a/glom/bakery/busy_cursor.h
+++ b/glom/bakery/busy_cursor.h
@@ -34,11 +34,11 @@ class BusyCursor
 public:
   /** Associate a busy cursor with the window, for the lifetime of this object.
    */
-  BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::WATCH);
+  explicit BusyCursor(Gtk::Window& window, Gdk::CursorType cursor_type = Gdk::WATCH);
 
   /**  Associate a busy cursor with the window, for the lifetime of this object, if window is not 0.
    */
-  BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::WATCH);
+  explicit BusyCursor(Gtk::Window* window, Gdk::CursorType cursor_type = Gdk::WATCH);
 
   virtual ~BusyCursor();
 
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.h b/glom/utility_widgets/canvas/canvas_image_movable.h
index a82cbb2..971fa49 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.h
+++ b/glom/utility_widgets/canvas/canvas_image_movable.h
@@ -32,8 +32,8 @@ class CanvasImageMovable
     public CanvasItemMovable
 {
 private:
-  CanvasImageMovable(double x = 0.0, double y = 0.0);
-  CanvasImageMovable(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double x = 0.0, double y = 0.0);
+  explicit CanvasImageMovable(double x = 0.0, double y = 0.0);
+  explicit CanvasImageMovable(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double x = 0.0, double y = 0.0);
   virtual ~CanvasImageMovable();
 
   void init();
diff --git a/glom/utility_widgets/canvas/canvas_text_movable.h b/glom/utility_widgets/canvas/canvas_text_movable.h
index faa35f1..35ad14d 100644
--- a/glom/utility_widgets/canvas/canvas_text_movable.h
+++ b/glom/utility_widgets/canvas/canvas_text_movable.h
@@ -32,7 +32,7 @@ class CanvasTextMovable
     public CanvasItemMovable
 {
 private:
-  CanvasTextMovable(const Glib::ustring& string = Glib::ustring(), double x = 0.0, double y = 0.0, double width = 0.0, Gtk::AnchorType anchor = Gtk::ANCHOR_NORTH_WEST);
+  explicit CanvasTextMovable(const Glib::ustring& string = Glib::ustring(), double x = 0.0, double y = 0.0, double width = 0.0, Gtk::AnchorType anchor = Gtk::ANCHOR_NORTH_WEST);
   virtual ~CanvasTextMovable();
 
   void init();
diff --git a/glom/utility_widgets/filechooserdialog_saveextras.h b/glom/utility_widgets/filechooserdialog_saveextras.h
index f9e87ac..115f4e4 100644
--- a/glom/utility_widgets/filechooserdialog_saveextras.h
+++ b/glom/utility_widgets/filechooserdialog_saveextras.h
@@ -41,7 +41,7 @@ class FileChooserDialog_SaveExtras : public Gtk::FileChooserDialog
 public:
   FileChooserDialog_SaveExtras(const Glib::ustring& title, Gtk::FileChooserAction action, const Glib::ustring& backend);
   FileChooserDialog_SaveExtras(Gtk::Window& parent, const Glib::ustring& title, Gtk::FileChooserAction action, const Glib::ustring& backend);
-  FileChooserDialog_SaveExtras(const Glib::ustring& title, Gtk::FileChooserAction action = Gtk::FILE_CHOOSER_ACTION_OPEN);
+  explicit FileChooserDialog_SaveExtras(const Glib::ustring& title, Gtk::FileChooserAction action = Gtk::FILE_CHOOSER_ACTION_OPEN);
   FileChooserDialog_SaveExtras(Gtk::Window& parent, const Glib::ustring& title, Gtk::FileChooserAction action = Gtk::FILE_CHOOSER_ACTION_OPEN);
   virtual ~FileChooserDialog_SaveExtras();
 
diff --git a/glom/utility_widgets/flowtable.h b/glom/utility_widgets/flowtable.h
index 75b3cd7..3f7aff7 100644
--- a/glom/utility_widgets/flowtable.h
+++ b/glom/utility_widgets/flowtable.h
@@ -119,7 +119,7 @@ protected:
     bool m_expand_first_full;
     bool m_expand_second;
     
-    bool operator==(Gtk::Widget* child)
+    bool operator==(Gtk::Widget* child) const
     {
       return (child == m_first || child == m_second);
     }
diff --git a/glom/window_boxholder.h b/glom/window_boxholder.h
index 26a3f18..e7b0a4c 100644
--- a/glom/window_boxholder.h
+++ b/glom/window_boxholder.h
@@ -43,7 +43,7 @@ class Window_BoxHolder :
 #endif
 {
 public: 
-  Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& title = Glib::ustring());
+  explicit Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& title = Glib::ustring());
   virtual ~Window_BoxHolder();
 
 private:



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