[glibmm] Gio::DBus: Use nullptr instead of 0.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::DBus: Use nullptr instead of 0.
- Date: Fri, 20 Nov 2015 09:38:06 +0000 (UTC)
commit 18db5d7fff3b21a754dd053c0af658bdff90241e
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Nov 20 10:10:22 2015 +0100
Gio::DBus: Use nullptr instead of 0.
gio/src/dbusaddress.ccg | 12 +++---
gio/src/dbusconnection.ccg | 86 +++++++++++++++++++-------------------
gio/src/dbusinterfacevtable.ccg | 2 +-
gio/src/dbusmessage.ccg | 2 +-
gio/src/dbusproxy.ccg | 54 ++++++++++++------------
gio/src/dbusserver.ccg | 4 +-
gio/src/dbussubtreevtable.ccg | 6 +-
7 files changed, 83 insertions(+), 83 deletions(-)
---
diff --git a/gio/src/dbusaddress.ccg b/gio/src/dbusaddress.ccg
index 2b39509..b69fb27 100644
--- a/gio/src/dbusaddress.ccg
+++ b/gio/src/dbusaddress.ccg
@@ -55,7 +55,7 @@ void get_stream(const std::string& address, const SlotAsyncReady slot,
void get_stream(const std::string& address, const SlotAsyncReady slot)
{
auto slot_copy = new SlotAsyncReady(slot);
- g_dbus_address_get_stream(address.c_str(), 0, &SignalProxy_async_callback,
+ g_dbus_address_get_stream(address.c_str(), nullptr, &SignalProxy_async_callback,
slot_copy);
}
@@ -81,7 +81,7 @@ Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res)
GError* gerror = nullptr;
auto result =
- Glib::wrap(g_dbus_address_get_stream_finish(Glib::unwrap(res), 0,
+ Glib::wrap(g_dbus_address_get_stream_finish(Glib::unwrap(res), nullptr,
&gerror));
if(gerror)
@@ -115,7 +115,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
auto result =
Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(),
- &g_out_guid, 0, &gerror));
+ &g_out_guid, nullptr, &gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -130,7 +130,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
GError* gerror = nullptr;
auto result =
- Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), 0,
+ Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), nullptr,
Glib::unwrap(cancellable), &gerror));
if(gerror)
@@ -144,7 +144,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address)
GError* gerror = nullptr;
auto result =
- Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), 0, 0, &gerror));
+ Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), nullptr, nullptr, &gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -171,7 +171,7 @@ std::string get_for_bus_sync(BusType bus_type)
GError* gerror = nullptr;
std::string result(g_dbus_address_get_for_bus_sync(
- static_cast<GBusType>(bus_type), 0, &gerror));
+ static_cast<GBusType>(bus_type), nullptr, &gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 465d126..9397525 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -71,7 +71,7 @@ static GDBusMessage* DBusConnection_Message_Filter_giomm_callback(
auto result = (*the_slot)(
Glib::wrap(connection, true), Glib::wrap(message, true),
static_cast<bool>(incoming));
- return (result) ? result->gobj_copy() : 0;
+ return (result) ? result->gobj_copy() : nullptr;
}
catch(...)
{
@@ -104,7 +104,7 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -118,9 +118,9 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init_async(slot, cancellable);
}
@@ -132,7 +132,7 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -145,9 +145,9 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init_async(slot);
}
@@ -158,7 +158,7 @@ Connection::Connection(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -170,9 +170,9 @@ Connection::Connection(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init_async(slot, cancellable);
}
@@ -182,7 +182,7 @@ Connection::Connection(const std::string& address,
const SlotAsyncReady& slot,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -193,9 +193,9 @@ Connection::Connection(const std::string& address,
const SlotAsyncReady& slot,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init_async(slot);
}
@@ -207,7 +207,7 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -220,9 +220,9 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init(cancellable);
}
@@ -233,7 +233,7 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -245,9 +245,9 @@ Connection::Connection(const Glib::RefPtr<IOStream>& stream,
ConnectionFlags flags)
:
_CONSTRUCT("stream", Glib::unwrap(stream),
- "guid", (guid.empty() ? 0 : guid.c_str()),
+ "guid", (guid.empty() ? nullptr : guid.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init();
}
@@ -257,7 +257,7 @@ Connection::Connection(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -268,9 +268,9 @@ Connection::Connection(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init(cancellable);
}
@@ -279,7 +279,7 @@ Connection::Connection(const std::string& address,
const Glib::RefPtr<AuthObserver>& observer,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
"authentication-observer", Glib::unwrap(observer))
{
@@ -289,9 +289,9 @@ Connection::Connection(const std::string& address,
Connection::Connection(const std::string& address,
ConnectionFlags flags)
:
- _CONSTRUCT("address", (address.empty() ? 0 : address.c_str()),
+ _CONSTRUCT("address", (address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusConnectionFlags>(flags),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init();
}
@@ -488,13 +488,13 @@ void Connection::get(BusType bus_type, const SlotAsyncReady& slot)
{
auto slot_copy = new SlotAsyncReady(slot);
- g_bus_get(static_cast<GBusType>(bus_type), 0, &SignalProxy_async_callback,
+ g_bus_get(static_cast<GBusType>(bus_type), nullptr, &SignalProxy_async_callback,
slot_copy);
}
void Connection::close()
{
- g_dbus_connection_close(gobj(), 0, 0, 0);
+ g_dbus_connection_close(gobj(), nullptr, nullptr, nullptr);
}
void Connection::close(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
@@ -512,14 +512,14 @@ void Connection::close(const SlotAsyncReady& slot)
auto slot_copy = new SlotAsyncReady(slot);
g_dbus_connection_close(gobj(),
- 0,
+ nullptr,
&SignalProxy_async_callback,
slot_copy);
}
void Connection::flush()
{
- g_dbus_connection_flush(gobj(), 0, 0, 0);
+ g_dbus_connection_flush(gobj(), nullptr, nullptr, nullptr);
}
void Connection::flush(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
@@ -537,7 +537,7 @@ void Connection::flush(const SlotAsyncReady& slot)
auto slot_copy = new SlotAsyncReady(slot);
g_dbus_connection_flush(gobj(),
- 0,
+ nullptr,
&SignalProxy_async_callback,
slot_copy);
}
@@ -548,7 +548,7 @@ bool Connection::send_message(const Glib::RefPtr<Message>& message,
GError* gerror = nullptr;
const bool result = g_dbus_connection_send_message(gobj(),
- Glib::unwrap(message), static_cast<GDBusSendMessageFlags>(flags), 0,
+ Glib::unwrap(message), static_cast<GDBusSendMessageFlags>(flags), nullptr,
&gerror);
if(gerror)
@@ -576,7 +576,7 @@ void Connection::send_message_with_reply(const Glib::RefPtr<Message>& message, i
g_dbus_connection_send_message_with_reply(gobj(), Glib::unwrap(message),
static_cast<GDBusSendMessageFlags>(message->get_flags()),
timeout_msec, &out_serial,
- 0, &SignalProxy_async_callback,
+ nullptr, &SignalProxy_async_callback,
slot_copy);
message->set_serial(out_serial);
}
@@ -612,7 +612,7 @@ Glib::RefPtr<Message> Connection::send_message_with_reply_sync(
g_dbus_connection_send_message_with_reply_sync(gobj(),
Glib::unwrap(message),
static_cast<GDBusSendMessageFlags>(message->get_flags()), timeout_msec,
- &out_serial, 0, &gerror);
+ &out_serial, nullptr, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -664,7 +664,7 @@ void Connection::call(
g_dbus_connection_call(gobj(), bus_name.c_str(), object_path.c_str(),
interface_name.c_str(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()), reply_type.gobj(),
- static_cast<GDBusCallFlags>(flags), timeout_msec, 0,
+ static_cast<GDBusCallFlags>(flags), timeout_msec, nullptr,
&SignalProxy_async_callback, slot_copy);
}
@@ -711,7 +711,7 @@ Glib::VariantContainerBase Connection::call_sync(
g_dbus_connection_call_sync(gobj(), bus_name.c_str(), object_path.c_str(),
interface_name.c_str(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()), reply_type.gobj(),
- static_cast<GDBusCallFlags>(flags), timeout_msec, 0, &gerror);
+ static_cast<GDBusCallFlags>(flags), timeout_msec, nullptr, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -768,7 +768,7 @@ void Connection::call(
object_path.c_str(), interface_name.c_str(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()), reply_type.gobj(),
static_cast<GDBusCallFlags>(flags), timeout_msec, Glib::unwrap(fd_list),
- 0, &SignalProxy_async_callback, slot_copy);
+ nullptr, &SignalProxy_async_callback, slot_copy);
}
#endif // G_OS_UNIX
@@ -786,10 +786,10 @@ void Connection::emit_signal(
// the bus name can be nullptr in the C API meaning that the signal should be
// emitted to all the listeners.
g_dbus_connection_emit_signal(gobj(),
- (destination_bus_name.empty() ? 0 : destination_bus_name.c_str()),
- (object_path.empty()? 0 : object_path.c_str()),
- (interface_name.empty() ? 0 : interface_name.c_str()),
- (signal_name.empty() ? 0 : signal_name.c_str()),
+ (destination_bus_name.empty() ? nullptr : destination_bus_name.c_str()),
+ (object_path.empty()? nullptr : object_path.c_str()),
+ (interface_name.empty() ? nullptr : interface_name.c_str()),
+ (signal_name.empty() ? nullptr : signal_name.c_str()),
const_cast<GVariant*>(parameters.gobj()), &gerror);
if(gerror)
@@ -835,7 +835,7 @@ guint Connection::register_object(const Glib::ustring& object_path,
const guint result = g_dbus_connection_register_object(gobj(),
object_path.c_str(), Glib::unwrap(interface_info),
- vtable.gobj(), const_cast<InterfaceVTable*>(&vtable), 0, &gerror);
+ vtable.gobj(), const_cast<InterfaceVTable*>(&vtable), nullptr, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -850,7 +850,7 @@ guint Connection::register_object(const Glib::ustring& object_path,
const guint result = g_dbus_connection_register_object(gobj(),
object_path.c_str(), Glib::unwrap(interface_info),
- 0, 0, 0, &gerror);
+ nullptr, nullptr, nullptr, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -866,7 +866,7 @@ guint Connection::register_subtree(const Glib::ustring& object_path,
const guint result = g_dbus_connection_register_subtree(gobj(),
object_path.c_str(),
vtable.gobj(), static_cast<GDBusSubtreeFlags>(flags),
- const_cast<SubtreeVTable*>(&vtable), 0, &gerror);
+ const_cast<SubtreeVTable*>(&vtable), nullptr, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/dbusinterfacevtable.ccg b/gio/src/dbusinterfacevtable.ccg
index 53e52b9..9d6834c 100644
--- a/gio/src/dbusinterfacevtable.ccg
+++ b/gio/src/dbusinterfacevtable.ccg
@@ -86,7 +86,7 @@ static GVariant* DBusInterfaceVTable_GetProperty_giomm_callback(
Glib::exception_handlers_invoke();
}
- return 0;
+ return nullptr;
}
static gboolean DBusInterfaceVTable_SetProperty_giomm_callback(
diff --git a/gio/src/dbusmessage.ccg b/gio/src/dbusmessage.ccg
index 1e97e01..25e7219 100644
--- a/gio/src/dbusmessage.ccg
+++ b/gio/src/dbusmessage.ccg
@@ -59,7 +59,7 @@ void Message::get_header(Glib::VariantBase& value,
#ifdef G_OS_UNIX
void Message::unset_unix_fd_list()
{
- g_dbus_message_set_unix_fd_list(gobj(), 0);
+ g_dbus_message_set_unix_fd_list(gobj(), nullptr);
}
#endif //G_OS_UNIX
diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg
index d9850d7..5e9874e 100644
--- a/gio/src/dbusproxy.ccg
+++ b/gio/src/dbusproxy.ccg
@@ -47,9 +47,9 @@ Proxy::Proxy(const Glib::RefPtr<Connection>& connection,
_CONSTRUCT("g-connection", Glib::unwrap(connection),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init_async(slot, cancellable);
}
@@ -65,9 +65,9 @@ Proxy::Proxy(const Glib::RefPtr<Connection>& connection,
_CONSTRUCT("g-connection", Glib::unwrap(connection),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init_async(slot);
}
@@ -83,9 +83,9 @@ Proxy::Proxy(const Glib::RefPtr<Connection>& connection,
_CONSTRUCT("g-connection", Glib::unwrap(connection),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init(cancellable);
}
@@ -100,9 +100,9 @@ Proxy::Proxy(const Glib::RefPtr<Connection>& connection,
_CONSTRUCT("g-connection", Glib::unwrap(connection),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init();
}
@@ -119,9 +119,9 @@ Proxy::Proxy(BusType bus_type,
_CONSTRUCT("g-bus-type", static_cast<GBusType>(bus_type),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init_async(slot, cancellable);
}
@@ -137,9 +137,9 @@ Proxy::Proxy(BusType bus_type,
_CONSTRUCT("g-bus-type", static_cast<GBusType>(bus_type),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init_async(slot);
}
@@ -155,9 +155,9 @@ Proxy::Proxy(BusType bus_type,
_CONSTRUCT("g-bus-type", static_cast<GBusType>(bus_type),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init(cancellable);
}
@@ -172,9 +172,9 @@ Proxy::Proxy(BusType bus_type,
_CONSTRUCT("g-bus-type", static_cast<GBusType>(bus_type),
"g-flags", static_cast<GDBusProxyFlags>(flags),
"g-interface-info", Glib::unwrap(info),
- "g-name", (name.empty() ? 0 : name.c_str()),
- "g-object-path", (object_path.empty() ? 0 : object_path.c_str()),
- "g-interface-name", (interface_name.empty() ? 0 : interface_name.c_str()))
+ "g-name", (name.empty() ? nullptr : name.c_str()),
+ "g-object-path", (object_path.empty() ? nullptr : object_path.c_str()),
+ "g-interface-name", (interface_name.empty() ? nullptr : interface_name.c_str()))
{
init();
}
@@ -319,7 +319,7 @@ void Proxy::call(const Glib::ustring& method_name,
g_dbus_proxy_call(gobj(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()),
static_cast<GDBusCallFlags>(flags), timeout_msec,
- 0, &SignalProxy_async_callback, slot_copy);
+ nullptr, &SignalProxy_async_callback, slot_copy);
}
Glib::VariantContainerBase Proxy::call_sync(
@@ -356,7 +356,7 @@ Glib::VariantContainerBase Proxy::call_sync(
GVariant* const gvariant =
g_dbus_proxy_call_sync(gobj(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()),
- static_cast<GDBusCallFlags>(flags), timeout_msec, 0, &g_error);
+ static_cast<GDBusCallFlags>(flags), timeout_msec, nullptr, &g_error);
if(g_error)
::Glib::Error::throw_exception(g_error);
@@ -403,7 +403,7 @@ void Proxy::call(
g_dbus_proxy_call_with_unix_fd_list(gobj(), method_name.c_str(),
const_cast<GVariant*>(parameters.gobj()),
static_cast<GDBusCallFlags>(flags), timeout_msec, Glib::unwrap(fd_list),
- 0, &SignalProxy_async_callback, slot_copy);
+ nullptr, &SignalProxy_async_callback, slot_copy);
}
#endif // G_OS_UNIX
diff --git a/gio/src/dbusserver.ccg b/gio/src/dbusserver.ccg
index 6cdf361..e726a16 100644
--- a/gio/src/dbusserver.ccg
+++ b/gio/src/dbusserver.ccg
@@ -51,7 +51,7 @@ Server::Server(const std::string& address,
(address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
"guid", (guid.empty() ? nullptr : guid.c_str()),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init(cancellable);
}
@@ -76,7 +76,7 @@ Server::Server(const std::string& address,
(address.empty() ? nullptr : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
"guid", (guid.empty() ? nullptr : guid.c_str()),
- "authentication-observer", static_cast<GDBusAuthObserver*>(0))
+ "authentication-observer", static_cast<GDBusAuthObserver*>(nullptr))
{
init();
}
diff --git a/gio/src/dbussubtreevtable.ccg b/gio/src/dbussubtreevtable.ccg
index 1299787..1b0e295 100644
--- a/gio/src/dbussubtreevtable.ccg
+++ b/gio/src/dbussubtreevtable.ccg
@@ -62,7 +62,7 @@ static char** DBusSubtreeVTable_Enumerate_giomm_callback(
Glib::exception_handlers_invoke();
}
- return 0;
+ return nullptr;
}
static GDBusInterfaceInfo** DBusSubtreeVTable_Introspect_giomm_callback(
@@ -97,7 +97,7 @@ static GDBusInterfaceInfo** DBusSubtreeVTable_Introspect_giomm_callback(
Glib::exception_handlers_invoke();
}
- return 0;
+ return nullptr;
}
static const GDBusInterfaceVTable* DBusSubtreeVTable_Dispatch_giomm_callback(
@@ -126,7 +126,7 @@ static const GDBusInterfaceVTable* DBusSubtreeVTable_Dispatch_giomm_callback(
Glib::exception_handlers_invoke();
}
- return 0;
+ return nullptr;
}
} // extern "C"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]