[glibmm/glibmm-2-32] Application: Pass 0 (NULL) rather than to GApplication.



commit 03bd3aea746c2340f3a8b93637b144c2eb612908
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon May 28 15:03:08 2012 +0200

    Application: Pass 0 (NULL) rather than  to GApplication.
    
    * gio/src/application.ccg: It is annoying that GApplication (and other
    C code) distinguishes, of course.

 ChangeLog               |    7 +++++++
 gio/src/application.ccg |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0d09c6c..bccb4a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-28  Murray Cumming  <murrayc murrayc com>
+
+	Application: Pass 0 (NULL) rather than "" to GApplication.
+
+	* gio/src/application.ccg: It is annoying that GApplication (and other 
+	C code) distinguishes, of course.
+
 2012-04-17  Krzesimir Nowak  <qdlacz gmail com>
 
 	Miscutils: Fix typos.
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 2942d75..8913b5f 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -116,7 +116,7 @@ Application::Application(const Glib::ustring& application_id, ApplicationFlags f
 :
   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
   Glib::ObjectBase(0),
-  Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id", application_id.c_str(), "flags", ((GApplicationFlags)(flags)), static_cast<char*>(0)))
+  Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ? 0 : application_id.c_str()), "flags", ((GApplicationFlags)(flags)), static_cast<char*>(0)))
 {
   
 }



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