summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gio/src/appinfo.ccg12
-rw-r--r--gio/src/application.ccg6
-rw-r--r--gio/src/asyncinitable.ccg2
-rw-r--r--gio/src/datainputstream.ccg24
-rw-r--r--gio/src/dbusaddress.ccg24
-rw-r--r--gio/src/dbusconnection.ccg18
-rw-r--r--gio/src/dbusproxy.ccg4
-rw-r--r--gio/src/file.ccg114
-rw-r--r--gio/src/fileattributeinfolist.ccg2
-rw-r--r--gio/src/fileinputstream.ccg4
-rw-r--r--gio/src/fileiostream.ccg4
-rw-r--r--gio/src/fileoutputstream.ccg4
-rw-r--r--gio/src/icon.ccg2
-rw-r--r--gio/src/loadableicon.ccg4
-rw-r--r--gio/src/memoryinputstream.ccg2
-rw-r--r--gio/src/menuattributeiter.ccg4
-rw-r--r--gio/src/menuitem.ccg2
-rw-r--r--gio/src/menulinkiter.ccg4
-rw-r--r--gio/src/mount.ccg4
-rw-r--r--gio/src/networkaddress.ccg2
-rw-r--r--gio/src/outputstream.ccg12
-rw-r--r--gio/src/proxyresolver.ccg2
-rw-r--r--gio/src/resource.ccg6
-rw-r--r--gio/src/socket.ccg12
-rw-r--r--gio/src/socketlistener.ccg50
-rw-r--r--glib/glibmm/error.cc20
-rw-r--r--glib/glibmm/exceptionhandler.cc2
-rw-r--r--glib/glibmm/helperlist.h2
-rw-r--r--glib/glibmm/interface.cc2
-rw-r--r--glib/glibmm/listhandle.h8
-rw-r--r--glib/glibmm/main.cc20
-rw-r--r--glib/glibmm/object.cc4
-rw-r--r--glib/glibmm/objectbase.cc6
-rw-r--r--glib/glibmm/objectbase.h4
-rw-r--r--glib/glibmm/property.cc8
-rw-r--r--glib/glibmm/propertyproxy_base.cc2
-rw-r--r--glib/glibmm/refptr.h2
-rw-r--r--glib/glibmm/signalproxy_connectionnode.cc4
-rw-r--r--glib/glibmm/slisthandle.h8
-rw-r--r--glib/glibmm/streamiochannel.cc8
-rw-r--r--glib/glibmm/stringutils.cc2
-rw-r--r--glib/glibmm/threadpool.cc14
-rw-r--r--glib/glibmm/ustring.cc10
-rw-r--r--glib/glibmm/wrap.cc8
-rw-r--r--glib/glibmm/wrap.h2
-rw-r--r--glib/src/binding.ccg2
-rw-r--r--glib/src/checksum.ccg2
-rw-r--r--glib/src/convert.ccg30
-rw-r--r--glib/src/fileutils.ccg12
-rw-r--r--glib/src/iochannel.ccg20
-rw-r--r--glib/src/keyfile.ccg44
-rw-r--r--glib/src/markup.ccg12
-rw-r--r--glib/src/miscutils.ccg6
-rw-r--r--glib/src/module.ccg2
-rw-r--r--glib/src/module.hg2
-rw-r--r--glib/src/nodetree.hg10
-rw-r--r--glib/src/optioncontext.ccg2
-rw-r--r--glib/src/optionentry.ccg6
-rw-r--r--glib/src/optiongroup.ccg16
-rw-r--r--glib/src/regex.ccg36
-rw-r--r--glib/src/shell.ccg6
-rw-r--r--glib/src/spawn.ccg16
-rw-r--r--glib/src/spawn.hg38
-rw-r--r--glib/src/thread.ccg4
-rw-r--r--glib/src/thread.hg6
-rw-r--r--glib/src/threads.ccg2
-rw-r--r--glib/src/threads.hg6
-rw-r--r--glib/src/variant.ccg8
-rw-r--r--glib/src/varianttype.ccg4
-rw-r--r--tests/glibmm_interface_implementation/main.cc4
-rw-r--r--tests/glibmm_vector/main.cc4
-rw-r--r--tools/extra_defs_gen/generate_extra_defs.cc8
-rw-r--r--tools/m4/class_boxedtype.m42
-rw-r--r--tools/m4/class_interface.m42
-rw-r--r--tools/m4/class_opaque_copyable.m42
-rw-r--r--tools/m4/method.m44
-rw-r--r--tools/m4/signal.m44
-rw-r--r--tools/m4/vfunc.m46
78 files changed, 394 insertions, 394 deletions
diff --git a/gio/src/appinfo.ccg b/gio/src/appinfo.ccg
index 8fab8a37..64f04d03 100644
--- a/gio/src/appinfo.ccg
+++ b/gio/src/appinfo.ccg
@@ -30,8 +30,8 @@ AppInfo::create_from_commandline(const std::string& commandline,
const std::string& application_name,
AppInfoCreateFlags flags)
{
- GAppInfo* capp_info = 0;
- GError* gerror = 0;
+ GAppInfo* capp_info = nullptr;
+ GError* gerror = nullptr;
capp_info = g_app_info_create_from_commandline(commandline.c_str(),
application_name.c_str(),
@@ -54,7 +54,7 @@ bool AppInfo::launch(const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<App
std::vector< Glib::RefPtr<Gio::File> > vec;
vec.push_back(file);
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_app_info_launch(gobj(), Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list(vec).data (), Glib::unwrap(launch_context), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -67,7 +67,7 @@ bool AppInfo::launch(const Glib::RefPtr<Gio::File>& file)
std::vector< Glib::RefPtr<Gio::File> > vec;
vec.push_back(file);
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_app_info_launch(gobj(), Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list(vec).data (), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -80,7 +80,7 @@ bool AppInfo::launch_uri(const std::string& uri, const Glib::RefPtr<AppLaunchCon
std::vector<std::string> vec;
vec.push_back(uri);
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_app_info_launch_uris(gobj(), Glib::ListHandler<std::string>::vector_to_list(vec).data (), Glib::unwrap(launch_context), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -93,7 +93,7 @@ bool AppInfo::launch_uri(const std::string& uri)
std::vector<std::string> vec;
vec.push_back(uri);
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_app_info_launch_uris(gobj(), Glib::ListHandler<std::string>::vector_to_list(vec).data (), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 3eccdda6..7b157b01 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -154,7 +154,7 @@ public:
const Gio::Application* get_application() const { return application_; }
gchar get_short_name() const { return short_name_; }
- bool is_filename_option() const { return slot_filename_ != 0; }
+ bool is_filename_option() const { return slot_filename_ != nullptr; }
const Glib::OptionGroup::SlotOptionArgString* get_slot_string() const
{ return slot_string_; }
@@ -222,7 +222,7 @@ gboolean Application_option_arg_callback(const gchar* option_name, const gchar*
return false;
}
- const bool has_value = (value != 0);
+ const bool has_value = (value != nullptr);
const OptionArgCallbackData* const option_arg = iterFind->second;
try
{
@@ -475,7 +475,7 @@ void Application::add_main_option_entry_private(GOptionArg arg, const Glib::ustr
else
// We ensure that this is null to ensure that it is not used,
// telling GApplication to put the parsed value in the options VariantDict instead.
- array[0].arg_data = 0;
+ array[0].arg_data = nullptr;
g_application_add_main_option_entries(gobj(), array);
}
diff --git a/gio/src/asyncinitable.ccg b/gio/src/asyncinitable.ccg
index 3867ef0e..df26f6f5 100644
--- a/gio/src/asyncinitable.ccg
+++ b/gio/src/asyncinitable.ccg
@@ -157,7 +157,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
if(base && base->init_finish)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool const result = (*base->init_finish)(gobj(), Glib::unwrap(res),
&gerror);
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg
index 0b4b4691..8dd8b317 100644
--- a/gio/src/datainputstream.ccg
+++ b/gio/src/datainputstream.ccg
@@ -26,7 +26,7 @@ namespace Gio
bool DataInputStream::read_line(std::string& line, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_line = g_data_input_stream_read_line(gobj(),
0, // pass NULL since we can easily determine the length from the returned std::string
Glib::unwrap(cancellable),
@@ -44,7 +44,7 @@ bool DataInputStream::read_line(std::string& line, const Glib::RefPtr<Cancellabl
bool DataInputStream::read_line(std::string& line)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_line = g_data_input_stream_read_line(gobj(),
0, // pass NULL since we can easily determine the length from the returned std::string
0,
@@ -76,7 +76,7 @@ void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::Re
bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize size = 0;
gchar* buffer = g_data_input_stream_read_line_finish(gobj(), Glib::unwrap(result), &size, &(gerror));
if(gerror)
@@ -85,7 +85,7 @@ bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result,
bool retval = false;
if(buffer && size)
{
- retval = (buffer != 0);
+ retval = (buffer != nullptr);
data = std::string(buffer, size);
g_free (buffer);
}
@@ -95,7 +95,7 @@ bool DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result,
bool DataInputStream::read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_str = g_data_input_stream_read_until(gobj(),
stop_chars.c_str(),
0, // pass NULL since we can easily determine the length from the returned std::string
@@ -116,7 +116,7 @@ bool DataInputStream::read_until(std::string& data, const std::string& stop_char
*/
bool DataInputStream::read_until(std::string& data, const std::string& stop_chars)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_str = g_data_input_stream_read_until(gobj(),
stop_chars.c_str(),
0, // pass NULL since we can easily determine the length from the returned std::string
@@ -149,7 +149,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot
bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize size = 0;
gchar* buffer = g_data_input_stream_read_until_finish(gobj(), Glib::unwrap(result), &size, &(gerror));
if(gerror)
@@ -158,7 +158,7 @@ bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result,
bool retval = false;
if(buffer && size)
{
- retval = (buffer != 0);
+ retval = (buffer != nullptr);
data = std::string(buffer, size);
g_free (buffer);
}
@@ -169,7 +169,7 @@ bool DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result,
bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_str = g_data_input_stream_read_upto(gobj(),
stop_chars.c_str(), -1, /* null-terminated */
0, // pass NULL since we can easily determine the length from the returned std::string
@@ -190,7 +190,7 @@ bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars
*/
bool DataInputStream::read_upto(std::string& data, const std::string& stop_chars)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char* c_str = g_data_input_stream_read_upto(gobj(),
stop_chars.c_str(), -1, /* null-terminated */
0, // pass NULL since we can easily determine the length from the returned std::string
@@ -226,7 +226,7 @@ void DataInputStream::read_upto_async(const std::string& stop_chars, const SlotA
bool DataInputStream::read_upto_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize size = 0;
gchar* buffer = g_data_input_stream_read_upto_finish(gobj(), Glib::unwrap(result), &size, &(gerror));
if(gerror)
@@ -235,7 +235,7 @@ bool DataInputStream::read_upto_finish(const Glib::RefPtr<AsyncResult>& result,
bool retval = false;
if(buffer && size)
{
- retval = (buffer != 0);
+ retval = (buffer != nullptr);
data = std::string(buffer, size);
g_free (buffer);
}
diff --git a/gio/src/dbusaddress.ccg b/gio/src/dbusaddress.ccg
index a8b1fd3b..2b395095 100644
--- a/gio/src/dbusaddress.ccg
+++ b/gio/src/dbusaddress.ccg
@@ -37,7 +37,7 @@ bool is_address(const std::string& string)
bool is_supported(const std::string& address)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool const result = g_dbus_is_supported_address(address.c_str(), &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -62,8 +62,8 @@ void get_stream(const std::string& address, const SlotAsyncReady slot)
Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res,
std::string& out_guid)
{
- GError* gerror = 0;
- gchar* g_out_guid = 0;
+ GError* gerror = nullptr;
+ gchar* g_out_guid = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_finish(Glib::unwrap(res),
@@ -78,7 +78,7 @@ Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res,
Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_finish(Glib::unwrap(res), 0,
@@ -93,8 +93,8 @@ Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res)
Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable, std::string& out_guid)
{
- GError* gerror = 0;
- gchar* g_out_guid = 0;
+ GError* gerror = nullptr;
+ gchar* g_out_guid = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(),
@@ -110,8 +110,8 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
std::string& out_guid)
{
- GError* gerror = 0;
- gchar* g_out_guid = 0;
+ GError* gerror = nullptr;
+ gchar* g_out_guid = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(),
@@ -127,7 +127,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), 0,
@@ -141,7 +141,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address,
Glib::RefPtr<IOStream> get_stream_sync(const std::string& address)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto result =
Glib::wrap(g_dbus_address_get_stream_sync(address.c_str(), 0, 0, &gerror));
@@ -155,7 +155,7 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address)
std::string get_for_bus_sync(BusType bus_type,
const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
std::string result(g_dbus_address_get_for_bus_sync(
static_cast<GBusType>(bus_type), Glib::unwrap(cancellable), &gerror));
@@ -168,7 +168,7 @@ std::string get_for_bus_sync(BusType bus_type,
std::string get_for_bus_sync(BusType bus_type)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
std::string result(g_dbus_address_get_for_bus_sync(
static_cast<GBusType>(bus_type), 0, &gerror));
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 31020505..0e9faf67 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -545,7 +545,7 @@ void Connection::flush(const SlotAsyncReady& slot)
bool Connection::send_message(const Glib::RefPtr<Message>& message,
SendMessageFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const bool result = g_dbus_connection_send_message(gobj(),
Glib::unwrap(message), static_cast<GDBusSendMessageFlags>(flags), 0,
@@ -587,7 +587,7 @@ Glib::RefPtr<Message> Connection::send_message_with_reply_sync(
gint timeout_msec)
{
volatile guint32 out_serial = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
GDBusMessage* result =
g_dbus_connection_send_message_with_reply_sync(gobj(),
@@ -606,7 +606,7 @@ Glib::RefPtr<Message> Connection::send_message_with_reply_sync(
gint timeout_msec)
{
volatile guint32 out_serial = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
GDBusMessage* result =
g_dbus_connection_send_message_with_reply_sync(gobj(),
@@ -679,7 +679,7 @@ Glib::VariantContainerBase Connection::call_sync(
CallFlags flags,
const Glib::VariantType& reply_type)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
GVariant* const gvariant =
g_dbus_connection_call_sync(gobj(), bus_name.c_str(), object_path.c_str(),
@@ -705,7 +705,7 @@ Glib::VariantContainerBase Connection::call_sync(
CallFlags flags,
const Glib::VariantType& reply_type)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
GVariant* const gvariant =
g_dbus_connection_call_sync(gobj(), bus_name.c_str(), object_path.c_str(),
@@ -779,7 +779,7 @@ void Connection::emit_signal(
const Glib::ustring& destination_bus_name,
const Glib::VariantContainerBase& parameters)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
// Strings are checked to see if they are empty so that NULL can be passed
// for those strings to the C API. This is done because some strings such as
@@ -827,7 +827,7 @@ guint Connection::register_object(const Glib::ustring& object_path,
const Glib::RefPtr<InterfaceInfo>& interface_info,
const InterfaceVTable& vtable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const guint result = g_dbus_connection_register_object(gobj(),
object_path.c_str(), Glib::unwrap(interface_info),
@@ -842,7 +842,7 @@ guint Connection::register_object(const Glib::ustring& object_path,
guint Connection::register_object(const Glib::ustring& object_path,
const Glib::RefPtr<InterfaceInfo>& interface_info)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const guint result = g_dbus_connection_register_object(gobj(),
object_path.c_str(), Glib::unwrap(interface_info),
@@ -857,7 +857,7 @@ guint Connection::register_object(const Glib::ustring& object_path,
guint Connection::register_subtree(const Glib::ustring& object_path,
const SubtreeVTable& vtable, SubtreeFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const guint result = g_dbus_connection_register_subtree(gobj(),
object_path.c_str(),
diff --git a/gio/src/dbusproxy.ccg b/gio/src/dbusproxy.ccg
index 25014f6d..d9850d70 100644
--- a/gio/src/dbusproxy.ccg
+++ b/gio/src/dbusproxy.ccg
@@ -330,7 +330,7 @@ Glib::VariantContainerBase Proxy::call_sync(
CallFlags flags
)
{
- GError* g_error = 0;
+ GError* g_error = nullptr;
GVariant* const gvariant =
g_dbus_proxy_call_sync(gobj(), method_name.c_str(),
@@ -351,7 +351,7 @@ Glib::VariantContainerBase Proxy::call_sync(
CallFlags flags
)
{
- GError* g_error = 0;
+ GError* g_error = nullptr;
GVariant* const gvariant =
g_dbus_proxy_call_sync(gobj(), method_name.c_str(),
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index f94511e4..7bace932 100644
--- a/gio/src/file.ccg
+++ b/gio/src/file.ccg
@@ -440,7 +440,7 @@ FileType File::query_file_type(FileQueryInfoFlags flags) const
Glib::RefPtr<FileInfo> File::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_query_info(const_cast<GFile*>(gobj()), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -450,7 +450,7 @@ Glib::RefPtr<FileInfo> File::query_info(const Glib::RefPtr<Cancellable>& cancell
Glib::RefPtr<FileInfo> File::query_info(const std::string& attributes, FileQueryInfoFlags flags) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_query_info(const_cast<GFile*>(gobj()), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -495,7 +495,7 @@ File::query_info_async(const SlotAsyncReady& slot, const std::string& attributes
Glib::RefPtr<FileInfo> File::query_filesystem_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_query_filesystem_info(gobj(), attributes.c_str(), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -505,7 +505,7 @@ Glib::RefPtr<FileInfo> File::query_filesystem_info(const Glib::RefPtr<Cancellabl
Glib::RefPtr<FileInfo> File::query_filesystem_info(const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_query_filesystem_info(gobj(), attributes.c_str(), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -547,7 +547,7 @@ File::query_filesystem_info_async(const SlotAsyncReady& slot, const std::string&
Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_enumerate_children(gobj(), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -557,7 +557,7 @@ Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancell
Glib::RefPtr<FileEnumerator> File::enumerate_children(const std::string& attributes, FileQueryInfoFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_enumerate_children(gobj(), attributes.c_str(), ((GFileQueryInfoFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -634,7 +634,7 @@ File::set_display_name_async(const Glib::ustring& display_name, const SlotAsyncR
bool
File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
// Create a copy of the slot.
@@ -661,7 +661,7 @@ File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
bool
File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
// Create a copy of the slot.
@@ -688,7 +688,7 @@ File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
bool
File::copy(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res = g_file_copy(gobj(),
Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
@@ -806,7 +806,7 @@ File::copy_async(const Glib::RefPtr<File>& destination,
bool
File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
// Create a move of the slot.
@@ -833,7 +833,7 @@ File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
bool
File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
// Create a move of the slot.
@@ -860,7 +860,7 @@ File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
bool
File::move(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
res = g_file_move(gobj(),
@@ -915,7 +915,7 @@ bool
File::set_attributes_finish(const Glib::RefPtr<AsyncResult>& result,
const Glib::RefPtr<FileInfo>& info)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
GFileInfo* cinfo = Glib::unwrap(info);
bool res;
@@ -1282,8 +1282,8 @@ File::load_partial_contents_async(const SlotReadMore& slot_read_more,
void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
- gchar* c_etag_new = 0;
+ GError* gerror = nullptr;
+ gchar* c_etag_new = nullptr;
g_file_replace_contents(gobj(), contents, length, etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1296,8 +1296,8 @@ void File::replace_contents(const char* contents, gsize length, const std::strin
void File::replace_contents(const char* contents, gsize length, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
- gchar* c_etag_new = 0;
+ GError* gerror = nullptr;
+ gchar* c_etag_new = nullptr;
g_file_replace_contents(gobj(), contents, length, etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1310,8 +1310,8 @@ void File::replace_contents(const char* contents, gsize length, const std::strin
void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, const Glib::RefPtr<Cancellable>& cancellable, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
- gchar* c_etag_new = 0;
+ GError* gerror = nullptr;
+ gchar* c_etag_new = nullptr;
g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1324,8 +1324,8 @@ void File::replace_contents(const std::string& contents, const std::string& etag
void File::replace_contents(const std::string& contents, const std::string& etag, std::string& new_etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
- gchar* c_etag_new = 0;
+ GError* gerror = nullptr;
+ gchar* c_etag_new = nullptr;
g_file_replace_contents(gobj(), contents.c_str(), contents.size(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), &c_etag_new, 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1434,8 +1434,8 @@ File::replace_contents_async(const SlotAsyncReady& slot,
void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result, std::string& new_etag)
{
- GError* gerror = 0;
- gchar* c_new_etag = 0;
+ GError* gerror = nullptr;
+ gchar* c_new_etag = nullptr;
g_file_replace_contents_finish(gobj(), Glib::unwrap(result), &c_new_etag, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1449,7 +1449,7 @@ void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result, std:
void File::replace_contents_finish(const Glib::RefPtr<AsyncResult>& result)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_file_replace_contents_finish(gobj(), Glib::unwrap(result), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1504,7 +1504,7 @@ File::replace_contents_bytes_async(const SlotAsyncReady& slot,
Glib::RefPtr<FileOutputStream> File::replace(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1514,7 +1514,7 @@ Glib::RefPtr<FileOutputStream> File::replace(const Glib::RefPtr<Cancellable>& ca
Glib::RefPtr<FileOutputStream> File::replace(const std::string& etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_replace(gobj(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1525,7 +1525,7 @@ Glib::RefPtr<FileOutputStream> File::replace(const std::string& etag, bool make_
Glib::RefPtr<FileIOStream> File::replace_readwrite(const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_replace_readwrite(gobj(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1535,7 +1535,7 @@ Glib::RefPtr<FileIOStream> File::replace_readwrite(const Glib::RefPtr<Cancellabl
Glib::RefPtr<FileIOStream> File::replace_readwrite(const std::string& etag, bool make_backup, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_replace_readwrite(gobj(), etag.empty() ? 0 : etag.c_str(), static_cast<int>(make_backup), ((GFileCreateFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1547,7 +1547,7 @@ Glib::RefPtr<FileIOStream> File::replace_readwrite(const std::string& etag, bool
Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1557,7 +1557,7 @@ Glib::RefPtr<FileMonitor> File::monitor_directory(const Glib::RefPtr<Cancellable
Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor_directory(gobj(), ((GFileMonitorFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1567,7 +1567,7 @@ Glib::RefPtr<FileMonitor> File::monitor_directory(FileMonitorFlags flags)
Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1577,7 +1577,7 @@ Glib::RefPtr<FileMonitor> File::monitor_file(const Glib::RefPtr<Cancellable>& ca
Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor_file(gobj(), ((GFileMonitorFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1588,7 +1588,7 @@ Glib::RefPtr<FileMonitor> File::monitor_file(FileMonitorFlags flags)
Glib::RefPtr<FileMonitor> File::monitor(const Glib::RefPtr<Cancellable>& cancellable, FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor(gobj(), ((GFileMonitorFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1598,7 +1598,7 @@ Glib::RefPtr<FileMonitor> File::monitor(const Glib::RefPtr<Cancellable>& cancell
Glib::RefPtr<FileMonitor> File::monitor(FileMonitorFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_monitor(gobj(), ((GFileMonitorFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1609,7 +1609,7 @@ Glib::RefPtr<FileMonitor> File::monitor(FileMonitorFlags flags)
void File::measure_disk_usage(const Glib::RefPtr<Cancellable>& cancellable, const SlotFileMeasureProgress& slot_progress, guint64& disk_usage, guint64& num_dirs, guint64& num_files, FileMeasureFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_file_measure_disk_usage(gobj(), ((GFileMeasureFlags)(flags)),
const_cast<GCancellable*>(Glib::unwrap(cancellable)),
&SignalProxy_file_measure_progress_callback, const_cast<SlotFileMeasureProgress*>(&slot_progress),
@@ -1754,7 +1754,7 @@ void File::find_enclosing_mount_async(const SlotAsyncReady& slot, int io_priorit
bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_set_attributes_from_info(gobj(), Glib::unwrap(info), ((GFileQueryInfoFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1764,7 +1764,7 @@ bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, const Gl
bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, FileQueryInfoFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_set_attributes_from_info(gobj(), Glib::unwrap(info), ((GFileQueryInfoFlags)(flags)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1775,7 +1775,7 @@ bool File::set_attributes_from_info(const Glib::RefPtr<FileInfo>& info, FileQuer
bool
File::copy_attributes(const Glib::RefPtr<File>& destination, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
res = g_file_copy_attributes(gobj(),
@@ -1793,7 +1793,7 @@ File::copy_attributes(const Glib::RefPtr<File>& destination, const Glib::RefPtr<
bool
File::copy_attributes(const Glib::RefPtr<File>& destination, FileCopyFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool res;
res = g_file_copy_attributes(gobj(),
@@ -1810,7 +1810,7 @@ File::copy_attributes(const Glib::RefPtr<File>& destination, FileCopyFlags flags
Glib::RefPtr<FileOutputStream> File::create_file(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_create(gobj(), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1820,7 +1820,7 @@ Glib::RefPtr<FileOutputStream> File::create_file(const Glib::RefPtr<Cancellable>
Glib::RefPtr<FileOutputStream> File::create_file(FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_create(gobj(), ((GFileCreateFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1830,7 +1830,7 @@ Glib::RefPtr<FileOutputStream> File::create_file(FileCreateFlags flags)
Glib::RefPtr<FileIOStream> File::create_file_readwrite(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_create_readwrite(gobj(), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1840,7 +1840,7 @@ Glib::RefPtr<FileIOStream> File::create_file_readwrite(const Glib::RefPtr<Cancel
Glib::RefPtr<FileIOStream> File::create_file_readwrite(FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_create_readwrite(gobj(), ((GFileCreateFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1850,7 +1850,7 @@ Glib::RefPtr<FileIOStream> File::create_file_readwrite(FileCreateFlags flags)
Glib::RefPtr<FileOutputStream> File::append_to(const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_append_to(gobj(), ((GFileCreateFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1860,7 +1860,7 @@ Glib::RefPtr<FileOutputStream> File::append_to(const Glib::RefPtr<Cancellable>&
Glib::RefPtr<FileOutputStream> File::append_to(FileCreateFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_append_to(gobj(), ((GFileCreateFlags)(flags)), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1870,8 +1870,8 @@ Glib::RefPtr<FileOutputStream> File::append_to(FileCreateFlags flags)
bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& contents, gsize& length, std::string& etag_out)
{
- GError* gerror = 0;
- gchar* cetag_out = 0;
+ GError* gerror = nullptr;
+ gchar* cetag_out = nullptr;
bool retvalue = g_file_load_contents(gobj(), Glib::unwrap(cancellable), &contents, &(length), &cetag_out, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1883,7 +1883,7 @@ bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& co
bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& contents, gsize& length)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_load_contents(gobj(), Glib::unwrap(cancellable), &contents, &(length), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1893,8 +1893,8 @@ bool File::load_contents(const Glib::RefPtr<Cancellable>& cancellable, char*& co
bool File::load_contents(char*& contents, gsize& length, std::string& etag_out)
{
- GError* gerror = 0;
- gchar* cetag_out = 0;
+ GError* gerror = nullptr;
+ gchar* cetag_out = nullptr;
bool retvalue = g_file_load_contents(gobj(), 0, &contents, &(length), &cetag_out, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1906,7 +1906,7 @@ bool File::load_contents(char*& contents, gsize& length, std::string& etag_out)
bool File::load_contents(char*& contents, gsize& length)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_load_contents(gobj(), 0, &contents, &(length), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1916,8 +1916,8 @@ bool File::load_contents(char*& contents, gsize& length)
bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out)
{
- GError* gerror = 0;
- gchar* cetag_out = 0;
+ GError* gerror = nullptr;
+ gchar* cetag_out = nullptr;
bool retvalue = g_file_load_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), &cetag_out, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1929,7 +1929,7 @@ bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*&
bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_load_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1939,8 +1939,8 @@ bool File::load_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*&
bool File::load_partial_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length, std::string& etag_out)
{
- GError* gerror = 0;
- gchar* cetag_out = 0;
+ GError* gerror = nullptr;
+ gchar* cetag_out = nullptr;
bool retvalue = g_file_load_partial_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), &cetag_out, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -1952,7 +1952,7 @@ bool File::load_partial_contents_finish(const Glib::RefPtr<AsyncResult>& result,
bool File::load_partial_contents_finish(const Glib::RefPtr<AsyncResult>& result, char*& contents, gsize& length)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_file_load_partial_contents_finish(gobj(), Glib::unwrap(result), &contents, &(length), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/fileattributeinfolist.ccg b/gio/src/fileattributeinfolist.ccg
index 7332e3d2..717b731e 100644
--- a/gio/src/fileattributeinfolist.ccg
+++ b/gio/src/fileattributeinfolist.ccg
@@ -29,7 +29,7 @@ FileAttributeInfoList::operator bool() const
bool FileAttributeInfoList::empty() const
{
- return gobj() == 0;
+ return gobj() == nullptr;
}
FileAttributeInfo
diff --git a/gio/src/fileinputstream.ccg b/gio/src/fileinputstream.ccg
index 087f9701..74242ddb 100644
--- a/gio/src/fileinputstream.ccg
+++ b/gio/src/fileinputstream.ccg
@@ -26,7 +26,7 @@ namespace Gio
Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -36,7 +36,7 @@ Glib::RefPtr<FileInfo> FileInputStream::query_info(const Glib::RefPtr<Cancellabl
Glib::RefPtr<FileInfo> FileInputStream::query_info(const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_input_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/fileiostream.ccg b/gio/src/fileiostream.ccg
index ed8757b9..e1a7c2d9 100644
--- a/gio/src/fileiostream.ccg
+++ b/gio/src/fileiostream.ccg
@@ -26,7 +26,7 @@ namespace Gio
Glib::RefPtr<FileInfo> FileIOStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -36,7 +36,7 @@ Glib::RefPtr<FileInfo> FileIOStream::query_info(const Glib::RefPtr<Cancellable>&
Glib::RefPtr<FileInfo> FileIOStream::query_info(const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_io_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/fileoutputstream.ccg b/gio/src/fileoutputstream.ccg
index 7b940feb..a0c31df6 100644
--- a/gio/src/fileoutputstream.ccg
+++ b/gio/src/fileoutputstream.ccg
@@ -28,7 +28,7 @@ namespace Gio
Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -40,7 +40,7 @@ Glib::RefPtr<FileInfo> FileOutputStream::query_info(const Glib::RefPtr<Cancellab
Glib::RefPtr<FileInfo> FileOutputStream::query_info(const std::string& attributes)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::wrap(g_file_output_stream_query_info(gobj(), g_strdup((attributes).c_str()), 0, &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/icon.ccg b/gio/src/icon.ccg
index 76295bf6..583897a2 100644
--- a/gio/src/icon.ccg
+++ b/gio/src/icon.ccg
@@ -32,7 +32,7 @@ Icon::equal(const Glib::RefPtr<Icon>& other) const
Glib::RefPtr<Icon> Icon::create(const std::string& str)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto icon = g_icon_new_for_string(str.c_str(), &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/loadableicon.ccg b/gio/src/loadableicon.ccg
index c11a44b7..9ae383d9 100644
--- a/gio/src/loadableicon.ccg
+++ b/gio/src/loadableicon.ccg
@@ -29,7 +29,7 @@ Glib::RefPtr<InputStream>
LoadableIcon::load(int size, Glib::ustring& type, const Glib::RefPtr<Cancellable>& cancellable)
{
char* c_type;
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retval =
Glib::wrap(g_loadable_icon_load(gobj(),
size,
@@ -50,7 +50,7 @@ Glib::RefPtr<InputStream>
LoadableIcon::load(int size, Glib::ustring& type)
{
char* c_type;
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retval =
Glib::wrap(g_loadable_icon_load(gobj(),
size,
diff --git a/gio/src/memoryinputstream.ccg b/gio/src/memoryinputstream.ccg
index 344506d6..cf30294c 100644
--- a/gio/src/memoryinputstream.ccg
+++ b/gio/src/memoryinputstream.ccg
@@ -70,7 +70,7 @@ void MemoryInputStream::add_data(const std::string& data)
void MemoryInputStream::add_data(const void* data, gssize len)
{
- char *data_copy = 0;
+ char *data_copy = nullptr;
// copy the data so that the caller doesn't need to keep the data alive
if (len < 0)
diff --git a/gio/src/menuattributeiter.ccg b/gio/src/menuattributeiter.ccg
index a6f9f68b..08e8d4e8 100644
--- a/gio/src/menuattributeiter.ccg
+++ b/gio/src/menuattributeiter.ccg
@@ -23,8 +23,8 @@ namespace Gio
bool MenuAttributeIter::get_next(Glib::ustring& out_name,
Glib::VariantBase& value)
{
- const char* g_out_name = 0;
- GVariant* g_value = 0;
+ const char* g_out_name = nullptr;
+ GVariant* g_value = nullptr;
bool const result = g_menu_attribute_iter_get_next(gobj(), &g_out_name,
&g_value);
diff --git a/gio/src/menuitem.ccg b/gio/src/menuitem.ccg
index de96ad38..4c011abe 100644
--- a/gio/src/menuitem.ccg
+++ b/gio/src/menuitem.ccg
@@ -57,7 +57,7 @@ void MenuItem::set_action(const Glib::ustring& action)
void MenuItem::unset_target()
{
- const gchar *action_name = 0;
+ const gchar *action_name = nullptr;
g_menu_item_get_attribute (gobj(), G_MENU_ATTRIBUTE_ACTION, "&s", &action_name);
g_menu_item_set_action_and_target_value(gobj(), action_name, 0);
diff --git a/gio/src/menulinkiter.ccg b/gio/src/menulinkiter.ccg
index 9fb93b55..b41fbb11 100644
--- a/gio/src/menulinkiter.ccg
+++ b/gio/src/menulinkiter.ccg
@@ -24,8 +24,8 @@ namespace Gio
bool MenuLinkIter::get_next(Glib::ustring& out_link,
Glib::RefPtr<MenuModel>& value)
{
- const char* g_out_link = 0;
- GMenuModel* g_value = 0;
+ const char* g_out_link = nullptr;
+ GMenuModel* g_value = nullptr;
bool const result = g_menu_link_iter_get_next(gobj(), &g_out_link, &g_value);
out_link = g_out_link;
diff --git a/gio/src/mount.ccg b/gio/src/mount.ccg
index 522a700f..d5c36446 100644
--- a/gio/src/mount.ccg
+++ b/gio/src/mount.ccg
@@ -281,7 +281,7 @@ void Mount::guess_content_type(bool force_rescan)
void Mount::guess_content_type_sync(const Glib::RefPtr<Cancellable>& cancellable, bool force_rescan)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_mount_guess_content_type_sync(gobj(), force_rescan, Glib::unwrap(cancellable),
&gerror);
if(gerror)
@@ -290,7 +290,7 @@ void Mount::guess_content_type_sync(const Glib::RefPtr<Cancellable>& cancellable
void Mount::guess_content_type_sync(bool force_rescan)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_mount_guess_content_type_sync(gobj(), force_rescan, 0, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/networkaddress.ccg b/gio/src/networkaddress.ccg
index 20cae4a2..dad0dcf1 100644
--- a/gio/src/networkaddress.ccg
+++ b/gio/src/networkaddress.ccg
@@ -28,7 +28,7 @@ namespace Gio
Glib::RefPtr<NetworkAddress>
NetworkAddress::parse(const std::string& host_and_port, guint16 default_port)
{
- GError *error = 0;
+ GError *error = nullptr;
auto *address = G_NETWORK_ADDRESS
(g_network_address_parse (host_and_port.c_str (), default_port,
&error));
diff --git a/gio/src/outputstream.ccg b/gio/src/outputstream.ccg
index 5ac47fbd..df1c53ba 100644
--- a/gio/src/outputstream.ccg
+++ b/gio/src/outputstream.ccg
@@ -191,7 +191,7 @@ OutputStream::close_async(const SlotAsyncReady& slot, int io_priority)
gssize OutputStream::write(const std::string& buffer, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gssize retvalue = g_output_stream_write(gobj(), buffer.data(), buffer.size(), Glib::unwrap(cancellable), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -201,7 +201,7 @@ gssize OutputStream::write(const std::string& buffer, const Glib::RefPtr<Cancell
gssize OutputStream::write(const std::string& buffer)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gssize retvalue = g_output_stream_write(gobj(), buffer.data(), buffer.size(), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -211,7 +211,7 @@ gssize OutputStream::write(const std::string& buffer)
bool OutputStream::write_all(const std::string& buffer, gsize& bytes_written, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_output_stream_write_all(gobj(), buffer.data(), buffer.size(), &(bytes_written), Glib::unwrap(cancellable), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -221,7 +221,7 @@ bool OutputStream::write_all(const std::string& buffer, gsize& bytes_written, co
bool OutputStream::write_all(const std::string& buffer, gsize& bytes_written)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_output_stream_write_all(gobj(), buffer.data(), buffer.size(), &(bytes_written), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -264,7 +264,7 @@ OutputStream::write_bytes_async(const Glib::RefPtr<const Glib::Bytes>& bytes, co
gssize OutputStream::splice(const Glib::RefPtr<InputStream>& source, const Glib::RefPtr<Cancellable>& cancellable, OutputStreamSpliceFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gssize retvalue = g_output_stream_splice(gobj(), Glib::unwrap(source), ((GOutputStreamSpliceFlags)(flags)), Glib::unwrap(cancellable), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -274,7 +274,7 @@ gssize OutputStream::splice(const Glib::RefPtr<InputStream>& source, const Glib:
gssize OutputStream::splice(const Glib::RefPtr<InputStream>& source, OutputStreamSpliceFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
gssize retvalue = g_output_stream_splice(gobj(), Glib::unwrap(source), ((GOutputStreamSpliceFlags)(flags)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gio/src/proxyresolver.ccg b/gio/src/proxyresolver.ccg
index 01a93b81..b5a05845 100644
--- a/gio/src/proxyresolver.ccg
+++ b/gio/src/proxyresolver.ccg
@@ -29,7 +29,7 @@ namespace Gio
std::vector<Glib::ustring> ProxyResolver::lookup(const Glib::ustring& uri)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue =
Glib::ArrayHandler<Glib::ustring>::array_to_vector(g_proxy_resolver_lookup(gobj(), uri.c_str(), 0, &(gerror)), Glib::OWNERSHIP_DEEP);
if(gerror)
diff --git a/gio/src/resource.ccg b/gio/src/resource.ccg
index 4a4b7162..89d776a7 100644
--- a/gio/src/resource.ccg
+++ b/gio/src/resource.ccg
@@ -24,7 +24,7 @@ void Resource::get_info(const std::string& path, gsize& size,
ResourceFlags& flags, ResourceLookupFlags lookup_flags) const
{
guint32 file_flags = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
// Ignore the gboolean return value from g_resource_get_info().
// gerror is set if and only if the return value is FALSE.
g_resource_get_info(const_cast<GResource*>(gobj()), path.c_str(),
@@ -36,7 +36,7 @@ void Resource::get_info(const std::string& path, gsize& size,
void Resource::get_file_exists(const std::string& path, ResourceLookupFlags lookup_flags) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_resource_get_info(const_cast<GResource*>(gobj()), path.c_str(),
(GResourceLookupFlags)lookup_flags, 0, 0, &gerror);
if (gerror)
@@ -55,7 +55,7 @@ void Resource::get_info_global(const std::string& path, gsize& size,
ResourceFlags& flags, ResourceLookupFlags lookup_flags)
{
guint32 file_flags = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
// Ignore the gboolean return value from g_resources_get_info().
// gerror is set if and only if the return value is FALSE.
g_resources_get_info(path.c_str(),
diff --git a/gio/src/socket.ccg b/gio/src/socket.ccg
index 107493f5..571bc00c 100644
--- a/gio/src/socket.ccg
+++ b/gio/src/socket.ccg
@@ -56,8 +56,8 @@ Glib::RefPtr<Socket> Socket::create_from_fd(int fd, const Glib::RefPtr<Cancellab
gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
- GSocketAddress* caddr = 0;
+ GError* gerror = nullptr;
+ GSocketAddress* caddr = nullptr;
auto retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -70,8 +70,8 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer,
gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size)
{
- GError* gerror = 0;
- GSocketAddress* caddr = 0;
+ GError* gerror = nullptr;
+ GSocketAddress* caddr = nullptr;
auto retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -85,7 +85,7 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer,
gssize Socket::receive_with_blocking(gchar* buffer, gsize size, bool blocking,
const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const auto retvalue = g_socket_receive_with_blocking(gobj(), buffer, size,
blocking, Glib::unwrap(cancellable), &(gerror));
if(gerror)
@@ -97,7 +97,7 @@ gssize Socket::receive_with_blocking(gchar* buffer, gsize size, bool blocking,
gssize Socket::send_with_blocking(gchar* buffer, gsize size, bool blocking,
const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const auto retvalue = g_socket_send_with_blocking(gobj(), buffer, size,
blocking, Glib::unwrap(cancellable), &(gerror));
if(gerror)
diff --git a/gio/src/socketlistener.ccg b/gio/src/socketlistener.ccg
index 75552e47..1697ced1 100644
--- a/gio/src/socketlistener.ccg
+++ b/gio/src/socketlistener.ccg
@@ -25,7 +25,7 @@ namespace Gio
bool SocketListener::add_socket(const Glib::RefPtr<Socket>& socket)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const bool retval = g_socket_listener_add_socket(gobj(),
Glib::unwrap(socket),
0,
@@ -40,8 +40,8 @@ bool SocketListener::add_socket(const Glib::RefPtr<Socket>& socket)
bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, SocketType type, SocketProtocol protocol, const Glib::RefPtr<Glib::Object>& source_object, Glib::RefPtr<SocketAddress>& effective_address)
{
- GError* gerror = 0;
- GSocketAddress *retaddr = 0;
+ GError* gerror = nullptr;
+ GSocketAddress *retaddr = nullptr;
const bool retval = g_socket_listener_add_address (gobj(),
Glib::unwrap(address),
static_cast<GSocketType>(type),
@@ -60,8 +60,8 @@ bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, Soc
bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, SocketType type, SocketProtocol protocol, Glib::RefPtr<SocketAddress>& effective_address)
{
- GError* gerror = 0;
- GSocketAddress *retaddr = 0;
+ GError* gerror = nullptr;
+ GSocketAddress *retaddr = nullptr;
const bool retval = g_socket_listener_add_address (gobj(),
Glib::unwrap(address),
static_cast<GSocketType>(type),
@@ -81,7 +81,7 @@ bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, Soc
bool SocketListener::add_inet_port(guint16 port)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const bool retvalue = g_socket_listener_add_inet_port(gobj(), port, 0, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -92,7 +92,7 @@ bool SocketListener::add_inet_port(guint16 port)
guint16 SocketListener::add_any_inet_port()
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const auto retvalue = g_socket_listener_add_any_inet_port(gobj(), 0, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -103,8 +103,8 @@ guint16 SocketListener::add_any_inet_port()
Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& source_object, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept_socket(gobj(),
&retobj,
Glib::unwrap(cancellable),
@@ -120,8 +120,8 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s
Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& source_object)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept_socket(gobj(),
&retobj,
0,
@@ -137,7 +137,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s
Glib::RefPtr<Socket> SocketListener::accept_socket(const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept_socket(gobj(),
0,
Glib::unwrap(cancellable),
@@ -150,7 +150,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(const Glib::RefPtr<Cancellabl
Glib::RefPtr<Socket> SocketListener::accept_socket()
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept_socket(gobj(),
0,
0,
@@ -190,8 +190,8 @@ void SocketListener::accept_socket_async(const SlotAsyncReady& slot)
Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<AsyncResult>& result, Glib::RefPtr<Glib::Object>& source_object)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept_socket_finish(gobj(),
Glib::unwrap(result),
&retobj,
@@ -206,7 +206,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy
Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<AsyncResult>& result)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept_socket_finish(gobj(),
Glib::unwrap(result),
0,
@@ -220,8 +220,8 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy
Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& source_object, const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept(gobj(),
&retobj,
Glib::unwrap(cancellable),
@@ -237,8 +237,8 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour
Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& source_object)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept(gobj(),
&retobj,
0,
@@ -254,7 +254,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour
Glib::RefPtr<SocketConnection> SocketListener::accept(const Glib::RefPtr<Cancellable>& cancellable)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept(gobj(),
0,
Glib::unwrap(cancellable),
@@ -267,7 +267,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(const Glib::RefPtr<Cancell
Glib::RefPtr<SocketConnection> SocketListener::accept()
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept(gobj(),
0,
0,
@@ -307,8 +307,8 @@ void SocketListener::accept_async(const Glib::RefPtr<Cancellable>& cancellable,
Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<AsyncResult>& result, Glib::RefPtr<Glib::Object>& source_object)
{
- GError* gerror = 0;
- GObject *retobj = 0;
+ GError* gerror = nullptr;
+ GObject *retobj = nullptr;
auto retvalue = g_socket_listener_accept_finish(gobj(),
Glib::unwrap(result),
&retobj,
@@ -323,7 +323,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<
Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<AsyncResult>& result)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = g_socket_listener_accept_finish(gobj(),
Glib::unwrap(result),
0,
diff --git a/glib/glibmm/error.cc b/glib/glibmm/error.cc
index d55cb434..8e2bf776 100644
--- a/glib/glibmm/error.cc
+++ b/glib/glibmm/error.cc
@@ -29,7 +29,7 @@ namespace
typedef std::map<GQuark,Glib::Error::ThrowFunc> ThrowFuncTable;
-static ThrowFuncTable* throw_func_table = 0;
+static ThrowFuncTable* throw_func_table = nullptr;
} // anonymous namespace
@@ -65,7 +65,7 @@ Error& Error::operator=(const Error& other)
if(gobject_)
{
g_error_free(gobject_);
- gobject_ = 0;
+ gobject_ = nullptr;
}
if(other.gobject_)
{
@@ -83,22 +83,22 @@ Error::~Error() throw()
GQuark Error::domain() const
{
- g_return_val_if_fail(gobject_ != 0, 0);
+ g_return_val_if_fail(gobject_ != nullptr, 0);
return gobject_->domain;
}
int Error::code() const
{
- g_return_val_if_fail(gobject_ != 0, -1);
+ g_return_val_if_fail(gobject_ != nullptr, -1);
return gobject_->code;
}
Glib::ustring Error::what() const
{
- g_return_val_if_fail(gobject_ != 0, "");
- g_return_val_if_fail(gobject_->message != 0, "");
+ g_return_val_if_fail(gobject_ != nullptr, "");
+ g_return_val_if_fail(gobject_->message != nullptr, "");
return gobject_->message;
}
@@ -121,7 +121,7 @@ const GError* Error::gobj() const
void Error::propagate(GError** dest)
{
g_propagate_error(dest, gobject_);
- gobject_ = 0;
+ gobject_ = nullptr;
}
// static
@@ -141,14 +141,14 @@ void Error::register_cleanup()
if(throw_func_table)
{
delete throw_func_table;
- throw_func_table = 0;
+ throw_func_table = nullptr;
}
}
// static
void Error::register_domain(GQuark error_domain, Error::ThrowFunc throw_func)
{
- g_assert(throw_func_table != 0);
+ g_assert(throw_func_table != nullptr);
(*throw_func_table)[error_domain] = throw_func;
}
@@ -156,7 +156,7 @@ void Error::register_domain(GQuark error_domain, Error::ThrowFunc throw_func)
// static, noreturn
void Error::throw_exception(GError* gobject)
{
- g_assert(gobject != 0);
+ g_assert(gobject != nullptr);
// Just in case Gtk::Main hasn't been instantiated yet.
if(!throw_func_table)
diff --git a/glib/glibmm/exceptionhandler.cc b/glib/glibmm/exceptionhandler.cc
index 734da3ef..aedb5432 100644
--- a/glib/glibmm/exceptionhandler.cc
+++ b/glib/glibmm/exceptionhandler.cc
@@ -40,7 +40,7 @@ static Glib::Threads::Private<HandlerList> thread_specific_handler_list;
static void glibmm_exception_warning(const GError* error)
{
- g_assert(error != 0);
+ g_assert(error != nullptr);
g_critical("\n"
"unhandled exception (type Glib::Error) in signal handler:\n"
diff --git a/glib/glibmm/helperlist.h b/glib/glibmm/helperlist.h
index d9a1c952..2028a1df 100644
--- a/glib/glibmm/helperlist.h
+++ b/glib/glibmm/helperlist.h
@@ -81,7 +81,7 @@ public:
}
inline size_type max_size() { return size_type(-1); }
- inline bool empty() { return glist() == 0; }
+ inline bool empty() { return glist() == nullptr; }
inline iterator begin()
{return begin_();}
diff --git a/glib/glibmm/interface.cc b/glib/glibmm/interface.cc
index c8495653..8ed14d39 100644
--- a/glib/glibmm/interface.cc
+++ b/glib/glibmm/interface.cc
@@ -98,7 +98,7 @@ Interface::Interface(const Interface_Class& interface_class)
g_free(iface_props);
}
}
- else // gobject_ == 0
+ else // gobject_ == nullptr
{
// The GObject is not instantiated yet. Add to the custom_interface_classes
// and add the interface in the Glib::Object constructor.
diff --git a/glib/glibmm/listhandle.h b/glib/glibmm/listhandle.h
index e63bb0b0..76bb7a8f 100644
--- a/glib/glibmm/listhandle.h
+++ b/glib/glibmm/listhandle.h
@@ -37,7 +37,7 @@ namespace Container_Helpers
template <class Bi, class Tr>
GList* create_list(Bi pbegin, Bi pend, Tr)
{
- GList* head = 0;
+ GList* head = nullptr;
while(pend != pbegin)
{
@@ -56,7 +56,7 @@ GList* create_list(Bi pbegin, Bi pend, Tr)
template <class For, class Tr>
GList* create_list(For pbegin, Tr)
{
- GList* head = 0;
+ GList* head = nullptr;
while(*pbegin)
{
@@ -297,7 +297,7 @@ ListHandle<T,Tr>::~ListHandle()
if(ownership_ != Glib::OWNERSHIP_SHALLOW)
{
// Deep ownership: release each container element.
- for(GList* node = plist_; node != 0; node = node->next)
+ for(GList* node = plist_; node != nullptr; node = node->next)
Tr::release_c_type(static_cast<typename Tr::CTypeNonConst>(node->data));
}
g_list_free(plist_);
@@ -396,7 +396,7 @@ std::size_t ListHandle<T,Tr>::size() const
template <class T, class Tr> inline
bool ListHandle<T,Tr>::empty() const
{
- return (plist_ == 0);
+ return (plist_ == nullptr);
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
diff --git a/glib/glibmm/main.cc b/glib/glibmm/main.cc
index 81ffa403..9dfe09f7 100644
--- a/glib/glibmm/main.cc
+++ b/glib/glibmm/main.cc
@@ -102,7 +102,7 @@ void* SourceConnectionNode::notify(void* data)
if (self->source_)
{
GSource* s = self->source_;
- self->source_ = 0;
+ self->source_ = nullptr;
g_source_destroy(s);
// Destroying the object triggers execution of destroy_notify_handler(),
@@ -120,7 +120,7 @@ void SourceConnectionNode::destroy_notify_callback(void* data)
if (self)
{
// The GLib side is disconnected now, thus the GSource* is no longer valid.
- self->source_ = 0;
+ self->source_ = nullptr;
delete self;
}
@@ -200,10 +200,10 @@ void SourceCallbackData::destroy_notify_callback(void* data)
*/
static SourceCallbackData* glibmm_source_get_callback_data(GSource* source)
{
- g_return_val_if_fail(source->callback_funcs != 0, 0);
+ g_return_val_if_fail(source->callback_funcs != nullptr, 0);
GSourceFunc func;
- void* user_data = 0;
+ void* user_data = nullptr;
// Retrieve the callback function and data.
(*source->callback_funcs->get)(source->callback_data, source, &func, &user_data);
@@ -268,7 +268,7 @@ static gboolean glibmm_source_callback_once(void* data)
static gboolean glibmm_iosource_callback(GIOChannel*, GIOCondition condition, void* data)
{
SourceCallbackData *const callback_data = static_cast<SourceCallbackData*>(data);
- g_return_val_if_fail(callback_data->node != 0, 0);
+ g_return_val_if_fail(callback_data->node != nullptr, 0);
try
{
@@ -943,10 +943,10 @@ Source::~Source()
if(gobject_)
{
SourceCallbackData *const data = glibmm_source_get_callback_data(gobject_);
- data->wrapper = 0;
+ data->wrapper = nullptr;
GSource *const tmp_gobject = gobject_;
- gobject_ = 0;
+ gobject_ = nullptr;
g_source_unref(tmp_gobject);
@@ -1035,7 +1035,7 @@ gboolean Source::dispatch_vfunc(GSource*, GSourceFunc callback, void* user_data)
SourceCallbackData *const callback_data = static_cast<SourceCallbackData*>(user_data);
g_return_val_if_fail(callback == &glibmm_dummy_source_callback, 0);
- g_return_val_if_fail(callback_data != 0 && callback_data->node != 0, 0);
+ g_return_val_if_fail(callback_data != nullptr && callback_data->node != nullptr, 0);
try
{
@@ -1057,7 +1057,7 @@ void Source::destroy_notify_callback(void* data)
Source *const self = static_cast<Source*>(data);
// gobject_ is already invalid at this point.
- self->gobject_ = 0;
+ self->gobject_ = nullptr;
// No exception checking: if the dtor throws, you're out of luck anyway.
delete self;
@@ -1094,7 +1094,7 @@ sigc::slot_base* Source::get_slot_from_connection_node(void* data)
sigc::slot_base* Source::get_slot_from_callback_data(void* data)
{
SourceCallbackData* const callback_data = static_cast<SourceCallbackData*>(data);
- g_return_val_if_fail(callback_data->node != 0, 0);
+ g_return_val_if_fail(callback_data->node != nullptr, 0);
return callback_data->node->get_slot();
}
diff --git a/glib/glibmm/object.cc b/glib/glibmm/object.cc
index 1658d81c..ddaa47b1 100644
--- a/glib/glibmm/object.cc
+++ b/glib/glibmm/object.cc
@@ -84,10 +84,10 @@ ConstructParams::ConstructParams(const Glib::Class& glibmm_class_,
static_cast<GObjectClass*>(g_type_class_ref(glibmm_class.get_type()));
unsigned int n_alloced_params = 0;
- char* collect_error = 0; // output argument of G_VALUE_COLLECT()
+ char* collect_error = nullptr; // output argument of G_VALUE_COLLECT()
for(const char* name = first_property_name;
- name != 0;
+ name != nullptr;
name = va_arg(var_args, char*))
{
GParamSpec *const pspec = g_object_class_find_property(g_class, name);
diff --git a/glib/glibmm/objectbase.cc b/glib/glibmm/objectbase.cc
index c7add7fe..c1efb135 100644
--- a/glib/glibmm/objectbase.cc
+++ b/glib/glibmm/objectbase.cc
@@ -119,7 +119,7 @@ ObjectBase::~ObjectBase()
g_warning("(Glib::ObjectBase::~ObjectBase): gobject_ = %p", (void*) gobject_);
#endif
- gobject_ = 0;
+ gobject_ = nullptr;
#ifdef GLIBMM_DEBUG_REFCOUNTING
g_warning("(Glib::ObjectBase::~ObjectBase): before g_object_steal_qdata()");
@@ -222,7 +222,7 @@ void ObjectBase::destroy_notify_()
g_warning("Glib::ObjectBase::destroy_notify_: gobject_ = %p", (void*) gobject_);
#endif
- gobject_ = 0; // Make sure we don't unref it again in the dtor.
+ gobject_ = nullptr; // Make sure we don't unref it again in the dtor.
delete this;
}
@@ -236,7 +236,7 @@ bool ObjectBase::is_anonymous_custom_() const
bool ObjectBase::is_derived_() const
{
// gtkmmproc-generated classes initialize this to 0 by default.
- return (custom_type_name_ != 0);
+ return (custom_type_name_ != nullptr);
}
void ObjectBase::set_manage()
diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h
index fe501dfc..78f1b13c 100644
--- a/glib/glibmm/objectbase.h
+++ b/glib/glibmm/objectbase.h
@@ -70,7 +70,7 @@ protected:
* The C++ language itself ensures that the constructor
* is only invoked once.
*
- * All classes generated by gtkmmproc use this constructor, with custom_type_name = 0,
+ * All classes generated by gtkmmproc use this constructor, with custom_type_name = nullptr,
* which essentially means it's not a custom type. This is used to optimize
* vfunc and signal handler callbacks -- since the C++ virtual methods are
* not overridden, invocation can be skipped.
@@ -224,7 +224,7 @@ public: // is_derived_() must be public, so that overridden vfuncs and signal h
/// This is for use by gtkmm wrappers only, and not by applications.
//inline bool is_derived_inline_() const
//{
- // return (custom_type_name_ != 0);
+ // return (custom_type_name_ != nullptr);
//}
protected:
diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc
index 4cf054f9..346c3e1f 100644
--- a/glib/glibmm/property.cc
+++ b/glib/glibmm/property.cc
@@ -239,7 +239,7 @@ PropertyBase::~PropertyBase()
bool PropertyBase::lookup_property(const Glib::ustring& name)
{
- g_assert(param_spec_ == 0);
+ g_assert(param_spec_ == nullptr);
param_spec_ = g_object_class_find_property(G_OBJECT_GET_CLASS(object_->gobj()), name.c_str());
@@ -249,12 +249,12 @@ bool PropertyBase::lookup_property(const Glib::ustring& name)
g_param_spec_ref(param_spec_);
}
- return (param_spec_ != 0);
+ return (param_spec_ != nullptr);
}
void PropertyBase::install_property(GParamSpec* param_spec)
{
- g_return_if_fail(param_spec != 0);
+ g_return_if_fail(param_spec != nullptr);
// Ensure that there would not be id clashes with possible existing
// properties overridden from implemented interfaces if dealing with a custom
@@ -280,7 +280,7 @@ void PropertyBase::install_property(GParamSpec* param_spec)
const char* PropertyBase::get_name_internal() const
{
const char *const name = g_param_spec_get_name(param_spec_);
- g_return_val_if_fail(name != 0, "");
+ g_return_val_if_fail(name != nullptr, "");
return name;
}
diff --git a/glib/glibmm/propertyproxy_base.cc b/glib/glibmm/propertyproxy_base.cc
index 0f1fac8e..4d449390 100644
--- a/glib/glibmm/propertyproxy_base.cc
+++ b/glib/glibmm/propertyproxy_base.cc
@@ -112,7 +112,7 @@ void PropertyProxy_Base::reset_property_()
const GParamSpec *const pParamSpec =
g_object_class_find_property(G_OBJECT_GET_CLASS(obj_->gobj()), property_name_);
- g_return_if_fail(pParamSpec != 0);
+ g_return_if_fail(pParamSpec != nullptr);
Glib::ValueBase value;
value.init(G_PARAM_SPEC_VALUE_TYPE(pParamSpec));
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index 7b11a756..ccfb26c7 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -305,7 +305,7 @@ bool RefPtr<T_CppObject>::operator!=(const RefPtr<T_CppObject>& src) const
template <class T_CppObject> inline
RefPtr<T_CppObject>::operator bool() const
{
- return (pCppObject_ != 0);
+ return (pCppObject_ != nullptr);
}
#ifndef GLIBMM_DISABLE_DEPRECATED
diff --git a/glib/glibmm/signalproxy_connectionnode.cc b/glib/glibmm/signalproxy_connectionnode.cc
index cc6f7079..6784d6eb 100644
--- a/glib/glibmm/signalproxy_connectionnode.cc
+++ b/glib/glibmm/signalproxy_connectionnode.cc
@@ -51,7 +51,7 @@ void* SignalProxyConnectionNode::notify(void* data)
if(conn && conn->object_)
{
GObject* o = conn->object_;
- conn->object_ = 0;
+ conn->object_ = nullptr;
if(g_signal_handler_is_connected(o, conn->connection_id_)) //We check first, because during destruction, GTK+ sometimes seems to disconnect them for us, before we expect it to. See bug #87912
{
@@ -84,7 +84,7 @@ void SignalProxyConnectionNode::destroy_notify_handler(gpointer data, GClosure*)
if(conn)
{
// the object has already lost track of this object.
- conn->object_ = 0;
+ conn->object_ = nullptr;
delete conn; // if there are connection objects referring to slot_ they are notified during destruction of slot_
}
diff --git a/glib/glibmm/slisthandle.h b/glib/glibmm/slisthandle.h
index a83cc85e..231d675c 100644
--- a/glib/glibmm/slisthandle.h
+++ b/glib/glibmm/slisthandle.h
@@ -37,7 +37,7 @@ namespace Container_Helpers
template <class Bi, class Tr>
GSList* create_slist(Bi pbegin, Bi pend, Tr)
{
- GSList* head = 0;
+ GSList* head = nullptr;
while(pend != pbegin)
{
@@ -56,7 +56,7 @@ GSList* create_slist(Bi pbegin, Bi pend, Tr)
template <class For, class Tr>
GSList* create_slist(For pbegin, Tr)
{
- GSList* head = 0;
+ GSList* head = nullptr;
while(*pbegin)
{
@@ -296,7 +296,7 @@ SListHandle<T,Tr>::~SListHandle()
if(ownership_ != Glib::OWNERSHIP_SHALLOW)
{
// Deep ownership: release each container element.
- for(GSList* node = pslist_; node != 0; node = node->next)
+ for(GSList* node = pslist_; node != nullptr; node = node->next)
Tr::release_c_type(static_cast<typename Tr::CTypeNonConst>(node->data));
}
g_slist_free(pslist_);
@@ -395,7 +395,7 @@ std::size_t SListHandle<T,Tr>::size() const
template <class T, class Tr> inline
bool SListHandle<T,Tr>::empty() const
{
- return (pslist_ == 0);
+ return (pslist_ == nullptr);
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
diff --git a/glib/glibmm/streamiochannel.cc b/glib/glibmm/streamiochannel.cc
index 8a1b10a7..674960dc 100644
--- a/glib/glibmm/streamiochannel.cc
+++ b/glib/glibmm/streamiochannel.cc
@@ -59,7 +59,7 @@ StreamIOChannel::~StreamIOChannel()
IOStatus StreamIOChannel::read_vfunc(char* buf, gsize count, gsize& bytes_read)
{
- g_return_val_if_fail(stream_in_ != 0, IO_STATUS_ERROR);
+ g_return_val_if_fail(stream_in_ != nullptr, IO_STATUS_ERROR);
stream_in_->clear();
stream_in_->read(buf, count);
@@ -78,7 +78,7 @@ IOStatus StreamIOChannel::read_vfunc(char* buf, gsize count, gsize& bytes_read)
IOStatus StreamIOChannel::write_vfunc(const char* buf, gsize count, gsize& bytes_written)
{
- g_return_val_if_fail(stream_out_ != 0, IO_STATUS_ERROR);
+ g_return_val_if_fail(stream_out_ != nullptr, IO_STATUS_ERROR);
bytes_written = 0;
@@ -173,8 +173,8 @@ IOStatus StreamIOChannel::set_flags_vfunc(IOFlags)
IOFlags StreamIOChannel::get_flags_vfunc()
{
gobj()->is_seekable = 1;
- gobj()->is_readable = (stream_in_ != 0);
- gobj()->is_writeable = (stream_out_ != 0);
+ gobj()->is_readable = (stream_in_ != nullptr);
+ gobj()->is_writeable = (stream_out_ != nullptr);
IOFlags flags = IO_FLAG_IS_SEEKABLE;
diff --git a/glib/glibmm/stringutils.cc b/glib/glibmm/stringutils.cc
index 5b61dd1c..e72f029d 100644
--- a/glib/glibmm/stringutils.cc
+++ b/glib/glibmm/stringutils.cc
@@ -51,7 +51,7 @@ double Glib::Ascii::strtod(const std::string& str,
}
const char *const bufptr = str.c_str();
- char* endptr = 0;
+ char* endptr = nullptr;
const double result = g_ascii_strtod(bufptr + start_index, &endptr);
const int err_no = errno;
diff --git a/glib/glibmm/threadpool.cc b/glib/glibmm/threadpool.cc
index 9a9af184..e8e35fde 100644
--- a/glib/glibmm/threadpool.cc
+++ b/glib/glibmm/threadpool.cc
@@ -128,7 +128,7 @@ ThreadPool::ThreadPool(int max_threads, bool exclusive)
gobject_ (0),
slot_list_ (new SlotList())
{
- GError* error = 0;
+ GError* error = nullptr;
gobject_ = g_thread_pool_new(
&call_thread_entry_slot, slot_list_, max_threads, exclusive, &error);
@@ -136,7 +136,7 @@ ThreadPool::ThreadPool(int max_threads, bool exclusive)
if(error)
{
delete slot_list_;
- slot_list_ = 0;
+ slot_list_ = nullptr;
Glib::Error::throw_exception(error);
}
}
@@ -157,7 +157,7 @@ void ThreadPool::push(const sigc::slot<void>& slot)
{
sigc::slot<void> *const slot_ptr = slot_list_->push(slot);
- GError* error = 0;
+ GError* error = nullptr;
g_thread_pool_push(gobject_, slot_ptr, &error);
if(error)
@@ -169,7 +169,7 @@ void ThreadPool::push(const sigc::slot<void>& slot)
void ThreadPool::set_max_threads(int max_threads)
{
- GError* error = 0;
+ GError* error = nullptr;
g_thread_pool_set_max_threads(gobject_, max_threads, &error);
if(error)
@@ -193,7 +193,7 @@ unsigned int ThreadPool::unprocessed() const
bool ThreadPool::get_exclusive() const
{
- g_return_val_if_fail(gobject_ != 0, false);
+ g_return_val_if_fail(gobject_ != nullptr, false);
return gobject_->exclusive;
}
@@ -203,14 +203,14 @@ void ThreadPool::shutdown(bool immediately)
if(gobject_)
{
g_thread_pool_free(gobject_, immediately, 1);
- gobject_ = 0;
+ gobject_ = nullptr;
}
if(slot_list_)
{
slot_list_->lock_and_unlock();
delete slot_list_;
- slot_list_ = 0;
+ slot_list_ = nullptr;
}
}
diff --git a/glib/glibmm/ustring.cc b/glib/glibmm/ustring.cc
index 6cb4b1f3..1d5e841d 100644
--- a/glib/glibmm/ustring.cc
+++ b/glib/glibmm/ustring.cc
@@ -1260,7 +1260,7 @@ ustring::FormatStream::~FormatStream()
ustring ustring::FormatStream::to_string() const
{
- GError* error = 0;
+ GError* error = nullptr;
#ifdef GLIBMM_HAVE_WIDE_STREAM
const std::wstring str = stream_.str();
@@ -1304,7 +1304,7 @@ std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string)
std::string str;
is >> str;
- GError* error = 0;
+ GError* error = nullptr;
gsize n_bytes = 0;
const ScopedPtr<char> buf (g_locale_to_utf8(str.data(), str.size(), 0, &n_bytes, &error));
@@ -1320,7 +1320,7 @@ std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string)
std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string)
{
- GError* error = 0;
+ GError* error = nullptr;
const ScopedPtr<char> buf (g_locale_from_utf8(utf8_string.raw().data(),
utf8_string.raw().size(), 0, 0, &error));
if (error)
@@ -1344,7 +1344,7 @@ std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string)
std::wistream& operator>>(std::wistream& is, ustring& utf8_string)
{
- GError* error = 0;
+ GError* error = nullptr;
std::wstring wstr;
is >> wstr;
@@ -1378,7 +1378,7 @@ std::wistream& operator>>(std::wistream& is, ustring& utf8_string)
std::wostream& operator<<(std::wostream& os, const ustring& utf8_string)
{
- GError* error = 0;
+ GError* error = nullptr;
#if defined(__STDC_ISO_10646__) && SIZEOF_WCHAR_T == 4
// Avoid going through iconv if wchar_t always contains UCS-4.
diff --git a/glib/glibmm/wrap.cc b/glib/glibmm/wrap.cc
index 4d9c71cf..4b801a46 100644
--- a/glib/glibmm/wrap.cc
+++ b/glib/glibmm/wrap.cc
@@ -38,7 +38,7 @@ namespace
typedef std::vector<Glib::WrapNewFunction> WrapFuncTable;
-static WrapFuncTable* wrap_func_table = 0;
+static WrapFuncTable* wrap_func_table = nullptr;
} // anonymous namespace
@@ -70,7 +70,7 @@ void wrap_register_cleanup()
if(wrap_func_table)
{
delete wrap_func_table;
- wrap_func_table = 0;
+ wrap_func_table = nullptr;
}
}
@@ -95,7 +95,7 @@ void wrap_register(GType type, WrapNewFunction func)
static Glib::ObjectBase* wrap_create_new_wrapper(GObject* object)
{
- g_return_val_if_fail(wrap_func_table != 0, 0);
+ g_return_val_if_fail(wrap_func_table != nullptr, 0);
const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_);
if(gtkmm_wrapper_already_deleted)
@@ -140,7 +140,7 @@ static gboolean gtype_wraps_interface(GType implementer_type, GType interface_ty
Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType interface_gtype)
{
- g_return_val_if_fail(wrap_func_table != 0, 0);
+ g_return_val_if_fail(wrap_func_table != nullptr, 0);
const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_);
if(gtkmm_wrapper_already_deleted)
diff --git a/glib/glibmm/wrap.h b/glib/glibmm/wrap.h
index c4ca34e0..f898785a 100644
--- a/glib/glibmm/wrap.h
+++ b/glib/glibmm/wrap.h
@@ -73,7 +73,7 @@ TInterface* wrap_auto_interface(GObject* object, bool take_copy = false)
//If no exact wrapper was created,
//create an instance of the interface,
//so we at least get the expected type:
- TInterface* result = 0;
+ TInterface* result = nullptr;
if(pCppObject)
{
result = dynamic_cast<TInterface*>(pCppObject);
diff --git a/glib/src/binding.ccg b/glib/src/binding.ccg
index 8362cb68..29d69ec7 100644
--- a/glib/src/binding.ccg
+++ b/glib/src/binding.ccg
@@ -83,7 +83,7 @@ Glib::RefPtr<Binding> Binding::bind_property_value(
const SlotTransform& transform_to,
const SlotTransform& transform_from)
{
- GBinding* binding = 0;
+ GBinding* binding = nullptr;
if (transform_to.empty() && transform_from.empty())
{
// No user-supplied transformations.
diff --git a/glib/src/checksum.ccg b/glib/src/checksum.ccg
index efa0d724..9a700501 100644
--- a/glib/src/checksum.ccg
+++ b/glib/src/checksum.ccg
@@ -28,7 +28,7 @@ Checksum::Checksum(ChecksumType type)
Checksum::operator bool() const
{
- return gobject_ != 0;
+ return gobject_ != nullptr;
}
gssize Checksum::get_length(ChecksumType checksum_type)
diff --git a/glib/src/convert.ccg b/glib/src/convert.ccg
index 295088b1..e7523139 100644
--- a/glib/src/convert.ccg
+++ b/glib/src/convert.ccg
@@ -35,7 +35,7 @@ IConv::IConv(const std::string& to_codeset, const std::string& from_codeset)
{
if(gobject_ == reinterpret_cast<GIConv>(-1))
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
// Abuse g_convert() to create a GError object. This may seem a weird
// thing to do, but it gives us consistently translated error messages
@@ -43,7 +43,7 @@ IConv::IConv(const std::string& to_codeset, const std::string& from_codeset)
g_convert("", 0, to_codeset.c_str(), from_codeset.c_str(), 0, 0, &gerror);
// If this should ever fail we're fucked.
- g_assert(gerror != 0);
+ g_assert(gerror != nullptr);
if(gerror) ::Glib::Error::throw_exception(gerror);
}
@@ -70,7 +70,7 @@ void IConv::reset()
// NULL for anything but inbuf; work around that. (NULL outbuf
// or NULL *outbuf is allowed by Unix98.)
- char* outbuf = 0;
+ char* outbuf = nullptr;
gsize inbytes_left = 0;
gsize outbytes_left = 0;
@@ -80,7 +80,7 @@ void IConv::reset()
std::string IConv::convert(const std::string& str)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_convert_with_iconv(
str.data(), str.size(), gobject_, 0, &bytes_written, &gerror);
@@ -100,7 +100,7 @@ bool get_charset()
bool get_charset(std::string& charset)
{
- const char* charset_cstr = 0;
+ const char* charset_cstr = nullptr;
const bool is_utf8 = g_get_charset(&charset_cstr);
charset = charset_cstr;
@@ -113,7 +113,7 @@ std::string convert(const std::string& str,
const std::string& from_codeset)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_convert(
str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(),
@@ -163,7 +163,7 @@ std::string convert_with_fallback(const std::string& str,
Glib::ustring locale_to_utf8(const std::string& opsys_string)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_locale_to_utf8(
opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror);
@@ -178,7 +178,7 @@ Glib::ustring locale_to_utf8(const std::string& opsys_string)
std::string locale_from_utf8(const Glib::ustring& utf8_string)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_locale_from_utf8(
utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror);
@@ -192,7 +192,7 @@ std::string locale_from_utf8(const Glib::ustring& utf8_string)
Glib::ustring filename_to_utf8(const std::string& opsys_string)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_filename_to_utf8(
opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror);
@@ -207,7 +207,7 @@ Glib::ustring filename_to_utf8(const std::string& opsys_string)
std::string filename_from_utf8(const Glib::ustring& utf8_string)
{
gsize bytes_written = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_filename_from_utf8(
utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror);
@@ -220,8 +220,8 @@ std::string filename_from_utf8(const Glib::ustring& utf8_string)
std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname)
{
- char* hostname_buf = 0;
- GError* gerror = 0;
+ char* hostname_buf = nullptr;
+ GError* gerror = nullptr;
char *const buf = g_filename_from_uri(uri.c_str(), &hostname_buf, &gerror);
@@ -241,7 +241,7 @@ std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname)
std::string filename_from_uri(const Glib::ustring& uri)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_filename_from_uri(uri.c_str(), 0, &gerror);
if(gerror) ::Glib::Error::throw_exception(gerror);
@@ -252,7 +252,7 @@ std::string filename_from_uri(const Glib::ustring& uri)
Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_filename_to_uri(filename.c_str(), hostname.c_str(), &gerror);
if(gerror) ::Glib::Error::throw_exception(gerror);
@@ -263,7 +263,7 @@ Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring&
Glib::ustring filename_to_uri(const std::string& filename)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const buf = g_filename_to_uri(filename.c_str(), 0, &gerror);
if(gerror) ::Glib::Error::throw_exception(gerror);
diff --git a/glib/src/fileutils.ccg b/glib/src/fileutils.ccg
index 42be941b..43dc1857 100644
--- a/glib/src/fileutils.ccg
+++ b/glib/src/fileutils.ccg
@@ -26,7 +26,7 @@ namespace Glib
Dir::Dir(const std::string& path)
{
- GError* error = 0;
+ GError* error = nullptr;
gobject_ = g_dir_open(path.c_str(), 0, &error);
if(error)
@@ -60,7 +60,7 @@ void Dir::close()
if(gobject_)
{
g_dir_close(gobject_);
- gobject_ = 0;
+ gobject_ = nullptr;
}
}
@@ -136,7 +136,7 @@ int file_open_tmp(std::string& name_used, const std::string& prefix)
std::string basename_template (prefix);
basename_template += "XXXXXX"; // this sillyness shouldn't be in the interface
- GError* error = 0;
+ GError* error = nullptr;
ScopedPtr<char> buf_name_used;
const auto fileno = g_file_open_tmp(basename_template.c_str(), buf_name_used.addr(), &error);
@@ -150,7 +150,7 @@ int file_open_tmp(std::string& name_used, const std::string& prefix)
int file_open_tmp(std::string& name_used)
{
- GError* error = 0;
+ GError* error = nullptr;
ScopedPtr<char> buf_name_used;
const auto fileno = g_file_open_tmp(0, buf_name_used.addr(), &error);
@@ -166,7 +166,7 @@ std::string file_get_contents(const std::string& filename)
{
ScopedPtr<char> contents;
gsize length = 0;
- GError* error = 0;
+ GError* error = nullptr;
g_file_get_contents(filename.c_str(), contents.addr(), &length, &error);
@@ -181,7 +181,7 @@ file_set_contents(const std::string& filename,
const gchar *contents,
gssize length)
{
- GError* error = 0;
+ GError* error = nullptr;
g_file_set_contents(filename.c_str(), contents, length, &error);
diff --git a/glib/src/iochannel.ccg b/glib/src/iochannel.ccg
index e093a50b..b92a83b8 100644
--- a/glib/src/iochannel.ccg
+++ b/glib/src/iochannel.ccg
@@ -136,7 +136,7 @@ IOChannel::IOChannel(GIOChannel* gobject, bool take_copy)
gobject_ (gobject)
{
// This ctor should never be called for GlibmmIOChannel instances.
- g_assert(gobject != 0);
+ g_assert(gobject != nullptr);
g_assert(gobject->funcs != &GlibmmIOChannel::vfunc_table);
if(take_copy)
@@ -157,11 +157,11 @@ IOChannel::~IOChannel()
if(gobject_->funcs == &GlibmmIOChannel::vfunc_table)
{
// Disconnect the wrapper object so that it won't be deleted twice.
- reinterpret_cast<GlibmmIOChannel*>(gobject_)->wrapper = 0;
+ reinterpret_cast<GlibmmIOChannel*>(gobject_)->wrapper = nullptr;
}
const auto tmp_gobject = gobject_;
- gobject_ = 0;
+ gobject_ = nullptr;
g_io_channel_unref(tmp_gobject);
}
@@ -169,7 +169,7 @@ IOChannel::~IOChannel()
Glib::RefPtr<IOChannel> IOChannel::create_from_file(const std::string& filename, const std::string& mode)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const auto channel = g_io_channel_new_file(filename.c_str(), mode.c_str(), &gerror);
if(gerror)
@@ -208,7 +208,7 @@ IOStatus IOChannel::write(const Glib::ustring& str)
IOStatus IOChannel::read_line(Glib::ustring& line)
{
Glib::ScopedPtr<char> buf;
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize bytes = 0;
const auto status = g_io_channel_read_line(gobj(), buf.addr(), &bytes, 0, &gerror);
@@ -229,7 +229,7 @@ IOStatus IOChannel::read_line(Glib::ustring& line)
IOStatus IOChannel::read_to_end(Glib::ustring& str)
{
Glib::ScopedPtr<char> buf;
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize bytes = 0;
const auto status = g_io_channel_read_to_end(gobj(), buf.addr(), &bytes, &gerror);
@@ -250,7 +250,7 @@ IOStatus IOChannel::read_to_end(Glib::ustring& str)
IOStatus IOChannel::read(Glib::ustring& str, gsize count)
{
Glib::ScopedPtr<char> buf (g_new(char, count));
- GError* gerror = 0;
+ GError* gerror = nullptr;
gsize bytes = 0;
const auto status = g_io_channel_read_chars(gobj(), buf.get(), count, &bytes, &gerror);
@@ -270,7 +270,7 @@ IOStatus IOChannel::read(Glib::ustring& str, gsize count)
IOStatus IOChannel::set_encoding(const std::string& encoding)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const auto status = g_io_channel_set_encoding(
gobj(), (encoding.empty()) ? 0 : encoding.c_str(), &gerror);
@@ -367,7 +367,7 @@ void IOChannel::unreference() const
Glib::RefPtr<IOChannel> wrap(GIOChannel* gobject, bool take_copy)
{
- IOChannel* cpp_object = 0;
+ IOChannel* cpp_object = nullptr;
if(gobject)
{
@@ -497,7 +497,7 @@ void GlibmmIOChannel::io_free(GIOChannel* channel)
{
if(IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper)
{
- wrapper->gobject_ = 0;
+ wrapper->gobject_ = nullptr;
delete wrapper;
}
diff --git a/glib/src/keyfile.ccg b/glib/src/keyfile.ccg
index 366b4980..4488e317 100644
--- a/glib/src/keyfile.ccg
+++ b/glib/src/keyfile.ccg
@@ -40,7 +40,7 @@ KeyFile::~KeyFile()
bool KeyFile::load_from_data(const Glib::ustring& data, KeyFileFlags flags)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const gboolean result = g_key_file_load_from_data(
gobj(), data.c_str(), data.bytes(),
@@ -55,8 +55,8 @@ bool KeyFile::load_from_data(const Glib::ustring& data, KeyFileFlags flags)
bool KeyFile::load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags)
{
- GError* gerror = 0;
- char* full_path_c = 0;
+ GError* gerror = nullptr;
+ char* full_path_c = nullptr;
const gboolean result = g_key_file_load_from_data_dirs(
gobj(), file.c_str(), &full_path_c,
@@ -76,8 +76,8 @@ bool KeyFile::load_from_data_dirs(const std::string& file, std::string& full_pat
bool KeyFile::load_from_dirs(const std::string& file, const Glib::ArrayHandle<std::string>& search_dirs, std::string& full_path, KeyFileFlags flags)
{
- GError* gerror = 0;
- char* full_path_c = 0;
+ GError* gerror = nullptr;
+ char* full_path_c = nullptr;
const gboolean result = g_key_file_load_from_dirs(
gobj(), file.c_str(), const_cast<const gchar**>(search_dirs.data()),
@@ -103,7 +103,7 @@ bool KeyFile::load_from_dirs(const std::string& file, const Glib::ArrayHandle<st
Glib::ustring KeyFile::to_data()
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const str = g_key_file_to_data(gobj(), 0, &gerror);
if(gerror)
@@ -123,7 +123,7 @@ Glib::ArrayHandle<Glib::ustring> KeyFile::get_groups() const
Glib::ArrayHandle<Glib::ustring> KeyFile::get_keys(const Glib::ustring& group_name) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char** const array = g_key_file_get_keys(
const_cast<GKeyFile*>(gobj()),
@@ -139,7 +139,7 @@ Glib::ArrayHandle<Glib::ustring> KeyFile::get_keys(const Glib::ustring& group_na
Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name,
const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const str = g_key_file_get_locale_string(
const_cast<GKeyFile*>(gobj()),
(group_name.empty()) ? 0 : group_name.c_str(),
@@ -153,7 +153,7 @@ Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name,
bool KeyFile::get_boolean(const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const bool value =
static_cast<bool>(g_key_file_get_boolean(const_cast<GKeyFile*>(gobj()),
0, key.c_str(), &gerror));
@@ -165,7 +165,7 @@ bool KeyFile::get_boolean(const Glib::ustring& key) const
int KeyFile::get_integer(const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const int value = g_key_file_get_integer(const_cast<GKeyFile*>(gobj()),
0, key.c_str(), &gerror);
if(gerror)
@@ -176,7 +176,7 @@ int KeyFile::get_integer(const Glib::ustring& key) const
gint64 KeyFile::get_int64(const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const gint64 value = g_key_file_get_int64(const_cast<GKeyFile*>(gobj()), 0,
key.c_str(), &gerror);
@@ -189,7 +189,7 @@ gint64 KeyFile::get_int64(const Glib::ustring& key) const
guint64 KeyFile::get_uint64(const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
const guint64 value = g_key_file_get_uint64(const_cast<GKeyFile*>(gobj()),
0, key.c_str(), &gerror);
@@ -202,7 +202,7 @@ guint64 KeyFile::get_uint64(const Glib::ustring& key) const
double KeyFile::get_double(const Glib::ustring& key) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
double retvalue = g_key_file_get_double(const_cast<GKeyFile*>(gobj()), 0, key.c_str(), &(gerror));
if(gerror)
@@ -224,7 +224,7 @@ Glib::ArrayHandle<Glib::ustring> KeyFile::get_string_list(const Glib::ustring& g
GLIBMM_ERROR_ARG) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char** const array = g_key_file_get_string_list(
const_cast<GKeyFile*>(gobj()),
@@ -242,7 +242,7 @@ Glib::ArrayHandle<Glib::ustring> KeyFile::get_locale_string_list(const Glib::ust
GLIBMM_ERROR_ARG) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
char** const array = g_key_file_get_locale_string_list(
const_cast<GKeyFile*>(gobj()),
@@ -259,7 +259,7 @@ Glib::ArrayHandle<bool> KeyFile::get_boolean_list(const Glib::ustring& group_nam
GLIBMM_ERROR_ARG) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
gboolean *const array = g_key_file_get_boolean_list(
const_cast<GKeyFile*>(gobj()),
@@ -276,7 +276,7 @@ Glib::ArrayHandle<int> KeyFile::get_integer_list(const Glib::ustring& group_name
GLIBMM_ERROR_ARG) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
int *const array = g_key_file_get_integer_list(
const_cast<GKeyFile*>(gobj()),
@@ -293,7 +293,7 @@ Glib::ArrayHandle<double> KeyFile::get_double_list(const Glib::ustring& group_na
GLIBMM_ERROR_ARG) const
{
gsize length = 0;
- GError* gerror = 0;
+ GError* gerror = nullptr;
double *const array = g_key_file_get_double_list(const_cast<GKeyFile*>(gobj()),
group_name.c_str(), key.c_str(),
@@ -341,7 +341,7 @@ void KeyFile::set_boolean_list(const Glib::ustring& group_name, const Glib::ustr
Glib::ustring KeyFile::get_comment() const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const str = g_key_file_get_comment(const_cast<GKeyFile*>(gobj()), 0, 0, &gerror);
GLIBMM_THROW(gerror);
@@ -351,7 +351,7 @@ Glib::ustring KeyFile::get_comment() const
Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name GLIBMM_ERROR_ARG) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
char *const str = g_key_file_get_comment(const_cast<GKeyFile*>(gobj()),
(group_name.empty()) ? 0 : group_name.c_str(),
0, &gerror);
@@ -362,7 +362,7 @@ Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name GLIBMM_ERROR_
void KeyFile::set_comment(const Glib::ustring& comment GLIBMM_ERROR_ARG)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_key_file_set_comment(gobj(), 0, 0, comment.c_str(), &gerror);
GLIBMM_THROW(gerror);
@@ -371,7 +371,7 @@ void KeyFile::set_comment(const Glib::ustring& comment GLIBMM_ERROR_ARG)
void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& comment
GLIBMM_ERROR_ARG)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_key_file_set_comment(gobj(), (group_name.empty()) ? 0 : group_name.c_str(),
0, comment.c_str(), &gerror);
GLIBMM_THROW(gerror);
diff --git a/glib/src/markup.ccg b/glib/src/markup.ccg
index ae3d4d2f..738ce781 100644
--- a/glib/src/markup.ccg
+++ b/glib/src/markup.ccg
@@ -110,7 +110,7 @@ void ParserCallbacks::start_element(GMarkupParseContext* context,
for(; *pname && *pvalue; ++pname, ++pvalue)
attributes.insert(Parser::AttributeMap::value_type(*pname, *pvalue));
- g_return_if_fail(*pname == 0 && *pvalue == 0);
+ g_return_if_fail(*pname == nullptr && *pvalue == nullptr);
}
cpp_context.get_parser()->on_start_element(cpp_context, element_name, attributes);
@@ -249,13 +249,13 @@ ParseContext::ParseContext(Parser& parser, ParseFlags flags)
ParseContext::~ParseContext()
{
- parser_ = 0;
+ parser_ = nullptr;
g_markup_parse_context_free(gobject_);
}
void ParseContext::parse(const Glib::ustring& text)
{
- GError* error = 0;
+ GError* error = nullptr;
g_markup_parse_context_parse(gobject_, text.data(), text.bytes(), &error);
if(error)
@@ -264,7 +264,7 @@ void ParseContext::parse(const Glib::ustring& text)
void ParseContext::parse(const char* text_begin, const char* text_end)
{
- GError* error = 0;
+ GError* error = nullptr;
g_markup_parse_context_parse(gobject_, text_begin, text_end - text_begin, &error);
if(error)
@@ -273,7 +273,7 @@ void ParseContext::parse(const char* text_begin, const char* text_end)
void ParseContext::end_parse()
{
- GError* error = 0;
+ GError* error = nullptr;
g_markup_parse_context_end_parse(gobject_, &error);
if(error)
@@ -306,7 +306,7 @@ void ParseContext::destroy_notify_callback(void* data)
ParseContext *const self = static_cast<ParseContext*>(data);
// Detect premature destruction.
- g_return_if_fail(self->parser_ == 0);
+ g_return_if_fail(self->parser_ == nullptr);
}
} // namespace Markup
diff --git a/glib/src/miscutils.ccg b/glib/src/miscutils.ccg
index 3beabc9e..9d7de8e1 100644
--- a/glib/src/miscutils.ccg
+++ b/glib/src/miscutils.ccg
@@ -49,7 +49,7 @@ void set_prgname(const std::string& prgname)
std::string getenv(const std::string& variable, bool& found)
{
const char *const value = g_getenv(variable.c_str());
- found = (value != 0);
+ found = (value != nullptr);
return convert_const_gchar_ptr_to_stdstring(value);
}
@@ -133,7 +133,7 @@ std::vector<std::string> get_system_data_dirs()
if(!cresult)
return result;
- for(const gchar* const * iter = cresult; *iter != 0; ++iter)
+ for(const gchar* const * iter = cresult; *iter != nullptr; ++iter)
{
result.push_back(
convert_const_gchar_ptr_to_stdstring(*iter));
@@ -150,7 +150,7 @@ std::vector<std::string> get_system_config_dirs()
if(!cresult)
return result;
- for(const gchar* const * iter = cresult; *iter != 0; ++iter)
+ for(const gchar* const * iter = cresult; *iter != nullptr; ++iter)
{
result.push_back(
convert_const_gchar_ptr_to_stdstring(*iter));
diff --git a/glib/src/module.ccg b/glib/src/module.ccg
index 8afd6d35..4e4666cd 100644
--- a/glib/src/module.ccg
+++ b/glib/src/module.ccg
@@ -34,7 +34,7 @@ Module::~Module()
Module::operator bool() const
{
- return (gobject_ != 0);
+ return (gobject_ != nullptr);
}
} // namespace Glib
diff --git a/glib/src/module.hg b/glib/src/module.hg
index 65f7f87a..f1caf774 100644
--- a/glib/src/module.hg
+++ b/glib/src/module.hg
@@ -61,7 +61,7 @@ public:
* Glib::Module module("plugins/helloworld");
* if(module)
* {
- * void* func = 0;
+ * void* func = nullptr;
* bool found = get_symbol("some_function", func);
* }
* @endcode
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 2866057e..fb0ff7b5 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -337,7 +337,7 @@ public:
{
sigc::slot<void, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_child);
- GNode* child = 0;
+ GNode* child = nullptr;
typedef sigc::slot<void, GNode*> type_foreach_gnode_slot;
type_foreach_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
@@ -370,7 +370,7 @@ public:
{
//We use a sigc::slot for the C callback, so we can bind some extra data.
sigc::slot<gboolean, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_node);
- GNode* child = 0;
+ GNode* child = nullptr;
typedef sigc::slot<gboolean, GNode*> type_traverse_gnode_slot;
type_traverse_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
@@ -690,11 +690,11 @@ private:
//Free the wrapped object (g_node_free not available)
g_slice_free(GNode, gobject_);
- gobject_ = 0;
+ gobject_ = nullptr;
}
///Create a new GNode, taking the contents of an existing node if one is specified.
- void clone(const NodeTree<T>* node = 0)
+ void clone(const NodeTree<T>* node = nullptr)
{
//Store the this pointer in the GNode so we can discover this wrapper later:
gobject_ = g_node_new(reinterpret_cast<gpointer>(this));
@@ -702,7 +702,7 @@ private:
if(node)
{
//Prepend the copied children of @node to the constructing node.
- for(const NodeTree<T>* i = node->last_child(); i != 0; i = i->prev_sibling())
+ for(const NodeTree<T>* i = node->last_child(); i != nullptr; i = i->prev_sibling())
prepend(*(new NodeTree<T>(*i)));
}
}
diff --git a/glib/src/optioncontext.ccg b/glib/src/optioncontext.ccg
index ecc1ac85..56980b49 100644
--- a/glib/src/optioncontext.ccg
+++ b/glib/src/optioncontext.ccg
@@ -65,7 +65,7 @@ OptionContext::~OptionContext()
if(has_ownership_)
g_option_context_free(gobj());
- gobject_ = 0;
+ gobject_ = nullptr;
}
void OptionContext::add_group(OptionGroup& group)
diff --git a/glib/src/optionentry.ccg b/glib/src/optionentry.ccg
index 9a64f102..37641692 100644
--- a/glib/src/optionentry.ccg
+++ b/glib/src/optionentry.ccg
@@ -75,7 +75,7 @@ void OptionEntry::set_long_name(const Glib::ustring& value)
if(gobject_->long_name)
{
g_free((gchar*)(gobject_->long_name));
- gobject_->long_name = 0;
+ gobject_->long_name = nullptr;
}
//Note that we do not use NULL for an empty string,
@@ -89,7 +89,7 @@ void OptionEntry::set_description(const Glib::ustring& value)
if(gobject_->description)
{
g_free((gchar*)(gobject_->description));
- gobject_->description = 0;
+ gobject_->description = nullptr;
}
gobj()->description = (value).empty() ? 0 : g_strdup((value).c_str());
@@ -100,7 +100,7 @@ void OptionEntry::set_arg_description(const Glib::ustring& value)
if(gobject_->arg_description)
{
g_free((gchar*)(gobject_->arg_description));
- gobject_->arg_description = 0;
+ gobject_->arg_description = nullptr;
}
gobj()->arg_description = (value).empty() ? 0 : g_strdup((value).c_str());
diff --git a/glib/src/optiongroup.ccg b/glib/src/optiongroup.ccg
index 42313bcf..4d26a8f7 100644
--- a/glib/src/optiongroup.ccg
+++ b/glib/src/optiongroup.ccg
@@ -43,7 +43,7 @@ public:
{ }
bool is_filename_option() const
- { return slot_filename_ != 0; }
+ { return slot_filename_ != nullptr; }
const OptionGroup::SlotOptionArgString* get_slot_string() const
{ return slot_string_; }
@@ -229,7 +229,7 @@ gboolean OptionGroup::option_arg_callback(const gchar* option_name, const gchar*
return false;
}
- const bool has_value = (value != 0);
+ const bool has_value = (value != nullptr);
const OptionArgCallback* const option_arg =
static_cast<const OptionArgCallback*>(cppOptionEntry.cpparg_);
try
@@ -294,7 +294,7 @@ OptionGroup::~OptionGroup()
if(has_ownership_)
{
g_option_group_unref(gobj());
- gobject_ = 0;
+ gobject_ = nullptr;
}
}
@@ -388,7 +388,7 @@ void OptionGroup::add_entry_with_wrapper(const OptionEntry& entry, GOptionArg ar
// Only one C variable shall be allocated for them.
// See https://bugzilla.gnome.org/show_bug.cgi?id=744854.
bool is_duplicate = false;
- void* carg = 0;
+ void* carg = nullptr;
if (arg_type != G_OPTION_ARG_CALLBACK)
{
for (type_map_entries::iterator iter = map_entries_.begin();
@@ -478,7 +478,7 @@ void OptionGroup::CppOptionEntry::allocate_c_arg()
{
char** typed_arg = new char*;
//The C code will allocate a char* and put it here, for us to g_free() later.
- *typed_arg = 0;
+ *typed_arg = nullptr;
carg_ = typed_arg;
break;
@@ -512,7 +512,7 @@ void OptionGroup::CppOptionEntry::allocate_c_arg()
case G_OPTION_ARG_NONE: // Actually a boolean.
{
gboolean* typed_arg = new gboolean;
- *typed_arg = 0;
+ *typed_arg = false;
carg_ = typed_arg;
break;
@@ -659,7 +659,7 @@ void OptionGroup::CppOptionEntry::release_c_arg()
//or add_entry_filename().
auto option_arg = static_cast<OptionArgCallback*>(cpparg_);
delete option_arg;
- cpparg_ = 0;
+ cpparg_ = nullptr;
break;
}
@@ -669,7 +669,7 @@ void OptionGroup::CppOptionEntry::release_c_arg()
}
}
- carg_ = 0;
+ carg_ = nullptr;
}
if(entry_)
diff --git a/glib/src/regex.ccg b/glib/src/regex.ccg
index 4f565810..61408cc6 100644
--- a/glib/src/regex.ccg
+++ b/glib/src/regex.ccg
@@ -24,7 +24,7 @@ Glib::RefPtr<Glib::Regex> Regex::create(const Glib::ustring& pattern,
RegexCompileFlags compile_options,
RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto regex = g_regex_new(pattern.c_str(), (GRegexCompileFlags)compile_options,
(GRegexMatchFlags)match_options, &gerror);
@@ -47,7 +47,7 @@ bool Regex::match(
RegexMatchFlags match_options
)
{
- GMatchInfo* ginfo = 0;
+ GMatchInfo* ginfo = nullptr;
bool const result = static_cast<bool>(g_regex_match(gobj(), string.c_str(),
static_cast<GRegexMatchFlags>(match_options), &ginfo));
match_info.set_gobject(ginfo);
@@ -66,8 +66,8 @@ bool Regex::match(
RegexMatchFlags match_options
)
{
- GError* gerror = 0;
- GMatchInfo* ginfo = 0;
+ GError* gerror = nullptr;
+ GMatchInfo* ginfo = nullptr;
bool const result = static_cast<bool>(g_regex_match_full(gobj(),
string.c_str(), -1, start_position,
@@ -88,8 +88,8 @@ bool Regex::match(
RegexMatchFlags match_options
)
{
- GError* gerror = 0;
- GMatchInfo* ginfo = 0;
+ GError* gerror = nullptr;
+ GMatchInfo* ginfo = nullptr;
bool const result = static_cast<bool>(g_regex_match_full(gobj(),
string.c_str(), string_len, start_position,
@@ -104,7 +104,7 @@ bool Regex::match(
bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_regex_match_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -114,7 +114,7 @@ bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFla
bool Regex::match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_regex_match_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -128,7 +128,7 @@ bool Regex::match_all(
RegexMatchFlags match_options
)
{
- GMatchInfo* ginfo = 0;
+ GMatchInfo* ginfo = nullptr;
bool const result = static_cast<bool>(g_regex_match_all(gobj(),
string.c_str(), static_cast<GRegexMatchFlags>(match_options),
&ginfo));
@@ -148,8 +148,8 @@ bool Regex::match_all(
RegexMatchFlags match_options
)
{
- GError* gerror = 0;
- GMatchInfo* ginfo = 0;
+ GError* gerror = nullptr;
+ GMatchInfo* ginfo = nullptr;
bool const retvalue = static_cast<bool>(g_regex_match_all_full(gobj(),
string.c_str(), -1, start_position,
@@ -170,8 +170,8 @@ bool Regex::match_all(
RegexMatchFlags match_options
)
{
- GError* gerror = 0;
- GMatchInfo* ginfo = 0;
+ GError* gerror = nullptr;
+ GMatchInfo* ginfo = nullptr;
bool const retvalue = static_cast<bool>(g_regex_match_all_full(gobj(),
string.c_str(), string_len, start_position,
@@ -186,7 +186,7 @@ bool Regex::match_all(
bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -196,7 +196,7 @@ bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatc
bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -206,7 +206,7 @@ bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_
Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -217,7 +217,7 @@ Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, co
Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace_literal(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror)));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -227,7 +227,7 @@ Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_posi
Glib::StringArrayHandle Regex::split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
auto retvalue = Glib::StringArrayHandle(g_regex_split_full(const_cast<GRegex*>(gobj()), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), max_tokens, &(gerror)), Glib::OWNERSHIP_DEEP);
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/glib/src/shell.ccg b/glib/src/shell.ccg
index 4950c086..db01f78e 100644
--- a/glib/src/shell.ccg
+++ b/glib/src/shell.ccg
@@ -25,9 +25,9 @@ namespace Glib
Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line)
{
- char** argv = 0;
+ char** argv = nullptr;
int argc = 0;
- GError* error = 0;
+ GError* error = nullptr;
g_shell_parse_argv(command_line.c_str(), &argc, &argv, &error);
@@ -45,7 +45,7 @@ std::string shell_quote(const std::string& unquoted_string)
std::string shell_unquote(const std::string& quoted_string)
{
- GError* error = 0;
+ GError* error = nullptr;
char *const buf = g_shell_unquote(quoted_string.c_str(), &error);
if(error)
diff --git a/glib/src/spawn.ccg b/glib/src/spawn.ccg
index ef9eed2d..5cfbdb7a 100644
--- a/glib/src/spawn.ccg
+++ b/glib/src/spawn.ccg
@@ -75,7 +75,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
{
const bool setup_slot = !child_setup.empty();
auto child_setup_ = child_setup;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_async_with_pipes(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -103,7 +103,7 @@ void spawn_async_with_pipes(const std::string& working_directory,
{
const bool setup_slot = !child_setup.empty();
auto child_setup_ = child_setup;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_async_with_pipes(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -128,7 +128,7 @@ void spawn_async(const std::string& working_directory,
{
const bool setup_slot = !child_setup.empty();
auto child_setup_ = child_setup;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_async(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -152,7 +152,7 @@ void spawn_async(const std::string& working_directory,
{
const bool setup_slot = !child_setup.empty();
auto child_setup_ = child_setup;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_async(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -181,7 +181,7 @@ void spawn_sync(const std::string& working_directory,
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_sync(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -215,7 +215,7 @@ void spawn_sync(const std::string& working_directory,
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_sync(
(working_directory.empty()) ? 0 : working_directory.c_str(),
@@ -237,7 +237,7 @@ void spawn_sync(const std::string& working_directory,
void spawn_command_line_async(const std::string& command_line)
{
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_command_line_async(command_line.c_str(), &gerror);
if(gerror)
@@ -251,7 +251,7 @@ void spawn_command_line_sync(const std::string& command_line,
{
Glib::ScopedPtr<char> buf_standard_output;
Glib::ScopedPtr<char> buf_standard_error;
- GError* gerror = 0;
+ GError* gerror = nullptr;
g_spawn_command_line_sync(
command_line.c_str(),
diff --git a/glib/src/spawn.hg b/glib/src/spawn.hg
index f82115e8..c10e44bf 100644
--- a/glib/src/spawn.hg
+++ b/glib/src/spawn.hg
@@ -197,10 +197,10 @@ void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- Pid* child_pid = 0,
- int* standard_input = 0,
- int* standard_output = 0,
- int* standard_error = 0);
+ Pid* child_pid = nullptr,
+ int* standard_input = nullptr,
+ int* standard_output = nullptr,
+ int* standard_error = nullptr);
/** Like the main spawn_async_with_pipes() method, but inheriting the parent's environment.
*
@@ -223,10 +223,10 @@ void spawn_async_with_pipes(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- Pid* child_pid = 0,
- int* standard_input = 0,
- int* standard_output = 0,
- int* standard_error = 0);
+ Pid* child_pid = nullptr,
+ int* standard_input = nullptr,
+ int* standard_output = nullptr,
+ int* standard_error = nullptr);
/** See spawn_async_with_pipes() for a full description. This function
* simply calls the spawn_async_with_pipes() without any pipes.
@@ -254,7 +254,7 @@ void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- Pid* child_pid = 0);
+ Pid* child_pid = nullptr);
/** Like the main spawn_async() method, but inheriting the parent's environment.
*
@@ -273,7 +273,7 @@ void spawn_async(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- Pid* child_pid = 0);
+ Pid* child_pid = nullptr);
/** Executes a child synchronously (waits for the child to exit before returning).
* All output from the child is stored in @a standard_output and @a standard_error,
@@ -312,9 +312,9 @@ void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& envp,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- std::string* standard_output = 0,
- std::string* standard_error = 0,
- int* exit_status = 0);
+ std::string* standard_output = nullptr,
+ std::string* standard_error = nullptr,
+ int* exit_status = nullptr);
/** Like the main spawn_sync() method, but inheriting the parent's environment.
*
@@ -336,9 +336,9 @@ void spawn_sync(const std::string& working_directory,
const Glib::ArrayHandle<std::string>& argv,
SpawnFlags flags = SPAWN_DEFAULT,
const SlotSpawnChildSetup& child_setup = SlotSpawnChildSetup(),
- std::string* standard_output = 0,
- std::string* standard_error = 0,
- int* exit_status = 0);
+ std::string* standard_output = nullptr,
+ std::string* standard_error = nullptr,
+ int* exit_status = nullptr);
/** A simple version of spawn_async() that parses a command line with
* shell_parse_argv() and passes it to spawn_async(). It runs a
@@ -393,9 +393,9 @@ void spawn_command_line_async(const std::string& command_line);
* @throws ShellError If the command line could not be parsed.
*/
void spawn_command_line_sync(const std::string& command_line,
- std::string* standard_output = 0,
- std::string* standard_error = 0,
- int* exit_status = 0);
+ std::string* standard_output = nullptr,
+ std::string* standard_error = nullptr,
+ int* exit_status = nullptr);
/** On some platforms, notably WIN32, the Pid type represents a resource
* which must be closed to prevent resource leaking. close_pid()
diff --git a/glib/src/thread.ccg b/glib/src/thread.ccg
index 2116b528..cfca2186 100644
--- a/glib/src/thread.ccg
+++ b/glib/src/thread.ccg
@@ -73,7 +73,7 @@ Thread* Thread::create(const sigc::slot<void>& slot, bool /* joinable */)
// Make a copy of slot on the heap
const auto slot_copy = new sigc::slot<void>(slot);
- GError* error = 0;
+ GError* error = nullptr;
const auto thread = g_thread_try_new(NULL,
&call_thread_entry_slot, slot_copy, &error);
@@ -99,7 +99,7 @@ Thread* Thread::create(const sigc::slot<void>& slot, unsigned long stack_size,
// Make a copy of slot on the heap
const auto slot_copy = new sigc::slot<void>(slot);
- GError* error = 0;
+ GError* error = nullptr;
const auto thread = g_thread_create_full(
&call_thread_entry_slot, slot_copy, stack_size, joinable,
diff --git a/glib/src/thread.hg b/glib/src/thread.hg
index dd116c35..b5efa43b 100644
--- a/glib/src/thread.hg
+++ b/glib/src/thread.hg
@@ -106,7 +106,7 @@ _WRAP_ENUM(ThreadPriority, GThreadPriority, NO_GTYPE)
/** Initializes the GLib thread system.
* @deprecated Calling thread_init() is no longer necessary and no longer has any effect.
*/
-void thread_init(GThreadFunctions* vtable = 0);
+void thread_init(GThreadFunctions* vtable = nullptr);
/** Returns whether the thread system is initialized.
* @return @c true, if the thread system is initialized.
@@ -630,7 +630,7 @@ private:
* @code
* Glib::Cond data_cond;
* Glib::Mutex data_mutex;
- * void* current_data = 0;
+ * void* current_data = nullptr;
*
* void push_data(void* data)
* {
@@ -648,7 +648,7 @@ private:
* data_cond.wait(data_mutex);
*
* void *const data = current_data;
- * current_data = 0;
+ * current_data = nullptr;
*
* return data;
* }
diff --git a/glib/src/threads.ccg b/glib/src/threads.ccg
index 49ad1079..e507b6d3 100644
--- a/glib/src/threads.ccg
+++ b/glib/src/threads.ccg
@@ -80,7 +80,7 @@ Thread* Thread::create(const sigc::slot<void>& slot, const std::string& name)
// Make a copy of slot on the heap.
const auto slot_copy = new sigc::slot<void>(slot);
- GError* error = 0;
+ GError* error = nullptr;
auto thread = g_thread_try_new(name.empty() ? 0 : name.c_str(),
&call_thread_entry_slot, slot_copy, &error);
diff --git a/glib/src/threads.hg b/glib/src/threads.hg
index 5fa559c6..412d5fb5 100644
--- a/glib/src/threads.hg
+++ b/glib/src/threads.hg
@@ -434,7 +434,7 @@ private:
* @code
* Glib::Threads::Cond data_cond;
* Glib::Threads::Mutex data_mutex;
- * void* current_data = 0;
+ * void* current_data = nullptr;
*
* void push_data(void* data)
* {
@@ -452,7 +452,7 @@ private:
* data_cond.wait(data_mutex);
*
* void* const data = current_data;
- * current_data = 0;
+ * current_data = nullptr;
*
* return data;
* }
@@ -508,7 +508,7 @@ public:
* return 0; // timeout
*
* void* const data = current_data;
- * current_data = 0;
+ * current_data = nullptr;
*
* return data;
* }
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index 7523db5b..7ab9cb13 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -125,7 +125,7 @@ VariantStringBase::VariantStringBase(GVariant* castitem, bool take_a_reference)
void VariantStringBase::create_object_path(VariantStringBase& output,
const std::string& object_path)
{
- GVariant* result = 0;
+ GVariant* result = nullptr;
result = g_variant_new_object_path(object_path.c_str());
g_variant_ref_sink(result);
output.init(result);
@@ -135,7 +135,7 @@ void VariantStringBase::create_object_path(VariantStringBase& output,
void VariantStringBase::create_signature(VariantStringBase& output,
const std::string& signature)
{
- GVariant* result = 0;
+ GVariant* result = nullptr;
result = g_variant_new_signature(signature.c_str());
g_variant_ref_sink(result);
output.init(result);
@@ -241,7 +241,7 @@ VariantIter VariantContainerBase::get_iter(const VariantType& container_variant_
// use the actual type (which may differ from container_variant_type, if
// the GVariant contains strings, object paths or DBus type signatures),
// otherwise let g_variant_get() report what's wrong with the type.
- GVariantIter* g_iter = 0;
+ GVariantIter* g_iter = nullptr;
g_variant_get(const_cast<GVariant*>(gobj()),
is_castable_to(container_variant_type) ?
get_type_string().c_str() : container_variant_type.get_string().c_str(),
@@ -409,7 +409,7 @@ std::string Variant<std::string>::get() const
{
const VariantType vtype = get_type();
- const char* pch = 0;
+ const char* pch = nullptr;
if(vtype.equal(VARIANT_TYPE_BYTESTRING))
pch = g_variant_get_bytestring(gobject_);
else //g_variant_get_string() can handle strings, object paths, and signatures.
diff --git a/glib/src/varianttype.ccg b/glib/src/varianttype.ccg
index 46153d6d..5a3702f8 100644
--- a/glib/src/varianttype.ccg
+++ b/glib/src/varianttype.ccg
@@ -27,7 +27,7 @@ VariantType::VariantType(const GVariantType* castitem)
if(castitem)
gobject_ = g_variant_type_copy(castitem);
else
- gobject_ = 0;
+ gobject_ = nullptr;
}
VariantType::VariantType(const std::string& type_string)
@@ -45,7 +45,7 @@ VariantType& VariantType::operator=(const GVariantType* castitem)
if(castitem)
gobject_ = g_variant_type_copy(castitem);
else
- gobject_ = 0;
+ gobject_ = nullptr;
return *this;
}
diff --git a/tests/glibmm_interface_implementation/main.cc b/tests/glibmm_interface_implementation/main.cc
index c748215f..40da2787 100644
--- a/tests/glibmm_interface_implementation/main.cc
+++ b/tests/glibmm_interface_implementation/main.cc
@@ -74,14 +74,14 @@ int main(int, char**)
<< action.property.get_value() << "'." << std::endl;
success &= action.property.get_value() == "A new value.";
- gchar* prop_value = 0;
+ gchar* prop_value = nullptr;
g_object_set(action.gobj(), "custom_property", "Another value", NULL);
g_object_get(action.gobj(), "custom_property", &prop_value, NULL);
std::cout << "The custom property after g_object_set/get() is '"
<< prop_value << "'." << std::endl;
success &= std::strcmp(prop_value, "Another value") == 0;
g_free(prop_value);
- prop_value = 0;
+ prop_value = nullptr;
std::cout << "The custom property through the Glib::Property<> is '"
<< action.property.get_value() << "'." << std::endl;
diff --git a/tests/glibmm_vector/main.cc b/tests/glibmm_vector/main.cc
index b1ae14bb..d184ecc0 100644
--- a/tests/glibmm_vector/main.cc
+++ b/tests/glibmm_vector/main.cc
@@ -40,7 +40,7 @@ const unsigned int magic_limit(5);
GList*
create_list()
{
- GList* head = 0;
+ GList* head = nullptr;
for(unsigned int iter(0); iter < magic_limit; ++iter)
{
@@ -142,7 +142,7 @@ copy_array(GCredentials** array)
{
dup[iter] = array[iter];
}
- dup[magic_limit] = 0;
+ dup[magic_limit] = nullptr;
return dup;
}
diff --git a/tools/extra_defs_gen/generate_extra_defs.cc b/tools/extra_defs_gen/generate_extra_defs.cc
index 8477f056..bc8a78cf 100644
--- a/tools/extra_defs_gen/generate_extra_defs.cc
+++ b/tools/extra_defs_gen/generate_extra_defs.cc
@@ -69,7 +69,7 @@ std::string get_properties(GType gtype)
std::string strObjectName = g_type_name(gtype);
//Get the list of properties:
- GParamSpec** ppParamSpec = 0;
+ GParamSpec** ppParamSpec = nullptr;
guint iCount = 0;
if(G_TYPE_IS_OBJECT(gtype))
{
@@ -160,8 +160,8 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
std::string strResult;
std::string strObjectName = g_type_name(gtype);
- gpointer gclass_ref = 0;
- gpointer ginterface_ref = 0;
+ gpointer gclass_ref = nullptr;
+ gpointer ginterface_ref = nullptr;
if(G_TYPE_IS_OBJECT(gtype))
gclass_ref = g_type_class_ref(gtype); //Ensures that class_init() is called.
@@ -229,7 +229,7 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
gchar* pchNum = g_strdup_printf("%d", j);
std::string strParamName = "p" + std::string(pchNum);
g_free(pchNum);
- pchNum = 0;
+ pchNum = nullptr;
//Just like above, for the return type:
std::string strTypeName = get_type_name_signal( typeParamMangled & ~G_SIGNAL_TYPE_STATIC_SCOPE, is_a_pointer_func ); //The type is mangled with a flag. Hacky.
diff --git a/tools/m4/class_boxedtype.m4 b/tools/m4/class_boxedtype.m4
index fc46097d..1afa53a5 100644
--- a/tools/m4/class_boxedtype.m4
+++ b/tools/m4/class_boxedtype.m4
@@ -139,7 +139,7 @@ __CPPNAME__::__CPPNAME__`'(__CPPNAME__&& other)
:
gobject_(other.gobject_)
{
- other.gobject_ = 0;
+ other.gobject_ = nullptr;
}
__CPPNAME__& __CPPNAME__::operator=(__CPPNAME__`'&& other)
diff --git a/tools/m4/class_interface.m4 b/tools/m4/class_interface.m4
index 8d25e6ae..f7e04010 100644
--- a/tools/m4/class_interface.m4
+++ b/tools/m4/class_interface.m4
@@ -96,7 +96,7 @@ void __CPPNAME__`'_Class::iface_init_function(void* g_iface, void*)
//This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
- g_assert(klass != 0);
+ g_assert(klass != nullptr);
_IMPORT(SECTION_PCC_CLASS_INIT_VFUNCS)
diff --git a/tools/m4/class_opaque_copyable.m4 b/tools/m4/class_opaque_copyable.m4
index b98502f3..f3fe4bd6 100644
--- a/tools/m4/class_opaque_copyable.m4
+++ b/tools/m4/class_opaque_copyable.m4
@@ -113,7 +113,7 @@ __CPPNAME__::__CPPNAME__`'(__CNAME__* castitem, bool make_a_copy /* = false */)
if(castitem)
gobject_ = __OPAQUE_FUNC_COPY`'(castitem);
else
- gobject_ = 0;
+ gobject_ = nullptr;
}
}
')
diff --git a/tools/m4/method.m4 b/tools/m4/method.m4
index fe4075d3..3ca4de6e 100644
--- a/tools/m4/method.m4
+++ b/tools/m4/method.m4
@@ -61,7 +61,7 @@ ifelse(`$8',,,`$8
')dnl
')',dnl End if a C++ output parameter is specified.
dnl If is errthrow or refreturn
-`ifelse(`$11',,,` GError* gerror = 0;
+`ifelse(`$11',,,` GError* gerror = nullptr;
')dnl
dnl If a slot type has been specified insert a slot copy declaration.
ifelse(`$18',,,dnl
@@ -155,7 +155,7 @@ dnl Return the value if it was stored and if the method returns something
ifelse(`$3',void,,`ifelse(`$6',,,` return retval;
')')dnl
',dnl End if a C++ output parameter is specified.
-`ifelse(`$10',,,` GError* gerror = 0;')
+`ifelse(`$10',,,` GError* gerror = nullptr;')
dnl If a slot type has been specified insert a slot copy declaration.
ifelse(`$15',,,dnl
dnl See if the slot should or should not be copied
diff --git a/tools/m4/signal.m4 b/tools/m4/signal.m4
index cc0473c8..d85f93c7 100644
--- a/tools/m4/signal.m4
+++ b/tools/m4/signal.m4
@@ -285,7 +285,7 @@ ifdef(`__BOOL_IS_INTERFACE__',`dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT($8)dnl
') );
-dnl g_assert(base != 0);
+dnl g_assert(base != nullptr);
// Call the original underlying C function:
if(base && base->$2)
@@ -331,7 +331,7 @@ ifdef(`__BOOL_IS_INTERFACE__',`dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT(gobject_)dnl
') );
-dnl g_assert(base != 0);
+dnl g_assert(base != nullptr);
if(base && base->$2)
ifelse($3,void,`dnl
diff --git a/tools/m4/vfunc.m4 b/tools/m4/vfunc.m4
index 6ed4989e..fd2aeb82 100644
--- a/tools/m4/vfunc.m4
+++ b/tools/m4/vfunc.m4
@@ -117,7 +117,7 @@ ifdef(`__BOOL_IS_INTERFACE__',`dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT($8)dnl
') );
-dnl g_assert(base != 0);
+dnl g_assert(base != nullptr);
// Call the original underlying C function:
if(base && base->$2)
@@ -170,12 +170,12 @@ ifdef(`__BOOL_IS_INTERFACE__',`dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT(gobject_)dnl
') );
-dnl g_assert(base != 0);
+dnl g_assert(base != nullptr);
if(base && base->$2)
{
ifelse($10,errthrow,`dnl
- GError* gerror = 0;
+ GError* gerror = nullptr;
')dnl
ifelse($3,void,`dnl
(*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6));