[glibmm] Replace static_cast<char*>(0) with nullptr.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Replace static_cast<char*>(0) with nullptr.
- Date: Fri, 20 Nov 2015 09:37:21 +0000 (UTC)
commit e33c50fed047436ed7e7b16cf901d08966c04e80
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Nov 19 12:45:05 2015 +0100
Replace static_cast<char*>(0) with nullptr.
gio/src/application.ccg | 2 +-
gio/src/dbusserver.ccg | 16 ++++++++--------
glib/src/miscutils.ccg | 16 ++++++++--------
3 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 7b157b0..c24eb3c 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -270,7 +270,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.empty() ? 0 :
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)), nullptr))
{
}
diff --git a/gio/src/dbusserver.ccg b/gio/src/dbusserver.ccg
index 8e22657..6cdf361 100644
--- a/gio/src/dbusserver.ccg
+++ b/gio/src/dbusserver.ccg
@@ -35,9 +35,9 @@ Server::Server(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ServerFlags flags)
: _CONSTRUCT("address",
- (address.empty() ? static_cast<char*>(0) : address.c_str()),
+ (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
- "guid", (guid.empty() ? static_cast<char*>(0) : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"authentication-observer", Glib::unwrap(observer))
{
init(cancellable);
@@ -48,9 +48,9 @@ Server::Server(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ServerFlags flags)
: _CONSTRUCT("address",
- (address.empty() ? static_cast<char*>(0) : address.c_str()),
+ (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
- "guid", (guid.empty() ? static_cast<char*>(0) : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"authentication-observer", static_cast<GDBusAuthObserver*>(0))
{
init(cancellable);
@@ -61,9 +61,9 @@ Server::Server(const std::string& address,
const Glib::RefPtr<AuthObserver>& observer,
ServerFlags flags)
: _CONSTRUCT("address",
- (address.empty() ? static_cast<char*>(0) : address.c_str()),
+ (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
- "guid", (guid.empty() ? static_cast<char*>(0) : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"authentication-observer", Glib::unwrap(observer))
{
init();
@@ -73,9 +73,9 @@ Server::Server(const std::string& address,
const std::string& guid,
ServerFlags flags)
: _CONSTRUCT("address",
- (address.empty() ? static_cast<char*>(0) : address.c_str()),
+ (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
- "guid", (guid.empty() ? static_cast<char*>(0) : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"authentication-observer", static_cast<GDBusAuthObserver*>(0))
{
init();
diff --git a/glib/src/miscutils.ccg b/glib/src/miscutils.ccg
index 9d7de8e..76b539d 100644
--- a/glib/src/miscutils.ccg
+++ b/glib/src/miscutils.ccg
@@ -194,21 +194,21 @@ std::string build_filename(const Glib::ArrayHandle<std::string>& elements)
std::string build_filename(const std::string& elem1, const std::string& elem2)
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
- elem2.c_str(), static_cast<char*>(0)));
+ elem2.c_str(), nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
const std::string& elem3)
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
- elem2.c_str(), elem3.c_str(), static_cast<char*>(0)));
+ elem2.c_str(), elem3.c_str(), nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
const std::string& elem3, const std::string& elem4)
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
- elem2.c_str(), elem3.c_str(), elem4.c_str(), static_cast<char*>(0)));
+ elem2.c_str(), elem3.c_str(), elem4.c_str(), nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
@@ -217,7 +217,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2,
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
elem2.c_str(), elem3.c_str(), elem4.c_str(), elem5.c_str(),
- static_cast<char*>(0)));
+ nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
@@ -226,7 +226,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2,
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
elem2.c_str(), elem3.c_str(), elem4.c_str(), elem5.c_str(), elem6.c_str(),
- static_cast<char*>(0)));
+ nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
@@ -236,7 +236,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2,
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
elem2.c_str(), elem3.c_str(), elem4.c_str(), elem5.c_str(), elem6.c_str(),
- elem7.c_str(), static_cast<char*>(0)));
+ elem7.c_str(), nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
@@ -246,7 +246,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2,
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
elem2.c_str(), elem3.c_str(), elem4.c_str(), elem5.c_str(), elem6.c_str(),
- elem7.c_str(), elem8.c_str(), static_cast<char*>(0)));
+ elem7.c_str(), elem8.c_str(), nullptr));
}
std::string build_filename(const std::string& elem1, const std::string& elem2,
@@ -257,7 +257,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2,
{
return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(),
elem2.c_str(), elem3.c_str(), elem4.c_str(), elem5.c_str(), elem6.c_str(),
- elem7.c_str(), elem8.c_str(), elem9.c_str(), static_cast<char*>(0)));
+ elem7.c_str(), elem8.c_str(), elem9.c_str(), nullptr));
}
std::string build_path(const std::string& separator, const Glib::ArrayHandle<std::string>& elements)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]