[glibmm] Application: Pass 0 (NULL) rather than to GApplication.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Application: Pass 0 (NULL) rather than to GApplication.
- Date: Mon, 28 May 2012 13:03:14 +0000 (UTC)
commit 3de5a13f4f6863b669a793373a4cf89b99a956e0
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 c357ddd..2461e87 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-05-27 Murray Cumming <murrayc murrayc com>
Gio::Application: Allow the application ID to be empty.
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]