gtkmm r1080 - in trunk: . gtk/src



Author: murrayc
Date: Mon Jan 19 11:46:54 2009
New Revision: 1080
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1080&view=rev

Log:
2009-01-19  Tao Wang  <dancefire gmail com>

* gtk/src/papersize.hg: Constructor: Remove the default value for the 
name parameter, because there is already a default constructor, 
which does something quite different. See the comments.
This caused MSVC++ warning C4520 with Visual Studio 2008.
Bug #568074.

Modified:
   trunk/ChangeLog
   trunk/gtk/src/papersize.hg

Modified: trunk/gtk/src/papersize.hg
==============================================================================
--- trunk/gtk/src/papersize.hg	(original)
+++ trunk/gtk/src/papersize.hg	Mon Jan 19 11:46:54 2009
@@ -49,10 +49,10 @@
   // Cannot pass the _new function here, it must accept the 'name' argument.
   _CLASS_BOXEDTYPE(PaperSize, GtkPaperSize, NONE, gtk_paper_size_copy, gtk_paper_size_free)
 public:
-  // Allowing no argument works because gtk_paper_size_new() will call
-  // gtk_paper_size_get_default() in case of NULL.
-  /// If a name is not specified, a default value will be used.
-  explicit PaperSize(const Glib::ustring& name = "");
+  // We don't use a "" default parameter vale, though gtk_paper_size_new() can take NULL,
+  // because there is already a (desired) default constructor (creating an invalid instance).
+  // get_default() does what name="" would do.
+  explicit PaperSize(const Glib::ustring& name);
   explicit PaperSize(const Glib::ustring& ppd_name, const Glib::ustring& ppd_display_name, double width, double height);
   explicit PaperSize(const Glib::ustring& name, const Glib::ustring& display_name, double width, double height, Unit unit);
 



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