summaryrefslogtreecommitdiff
path: root/glib/glibmm/wrap.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-11-19 15:34:10 +0100
committerMurray Cumming <murrayc@murrayc.com>2015-11-20 10:17:05 +0100
commit47d8024cdb18f29eb7def2bb843f0a1a07cef9dd (patch)
tree54cbe5d6dd16cb5f5b4f754efeec02b25fc24398 /glib/glibmm/wrap.cc
parent9b52cea1219d0565bca2e1411a39dbf58b3cf01d (diff)
downloadglibmm-47d8024cdb18f29eb7def2bb843f0a1a07cef9dd.tar.gz
More use of nullptr instead of 0.
Diffstat (limited to 'glib/glibmm/wrap.cc')
-rw-r--r--glib/glibmm/wrap.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/glib/glibmm/wrap.cc b/glib/glibmm/wrap.cc
index 4b801a46..eebe888c 100644
--- a/glib/glibmm/wrap.cc
+++ b/glib/glibmm/wrap.cc
@@ -95,13 +95,13 @@ void wrap_register(GType type, WrapNewFunction func)
static Glib::ObjectBase* wrap_create_new_wrapper(GObject* object)
{
- g_return_val_if_fail(wrap_func_table != nullptr, 0);
+ g_return_val_if_fail(wrap_func_table != nullptr, nullptr);
const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_);
if(gtkmm_wrapper_already_deleted)
{
g_warning("Glib::wrap_create_new_wrapper: Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper has been deleted.");
- return 0;
+ return nullptr;
}
// Traverse upwards through the inheritance hierarchy
@@ -119,7 +119,7 @@ static Glib::ObjectBase* wrap_create_new_wrapper(GObject* object)
}
}
- return 0;
+ return nullptr;
}
static gboolean gtype_wraps_interface(GType implementer_type, GType interface_type)
@@ -140,13 +140,13 @@ 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 != nullptr, 0);
+ g_return_val_if_fail(wrap_func_table != nullptr, nullptr);
const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_);
if(gtkmm_wrapper_already_deleted)
{
g_warning("Glib::wrap_create_new_wrapper: Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper has been deleted.");
- return 0;
+ return nullptr;
}
// Traverse upwards through the inheritance hierarchy
@@ -167,7 +167,7 @@ Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType i
}
}
- return 0;
+ return nullptr;
}
@@ -177,7 +177,7 @@ Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType i
ObjectBase* wrap_auto(GObject* object, bool take_copy)
{
if(!object)
- return 0;
+ return nullptr;
// Look up current C++ wrapper instance:
ObjectBase* pCppObject = ObjectBase::_get_current_wrapper(object);
@@ -190,7 +190,7 @@ ObjectBase* wrap_auto(GObject* object, bool take_copy)
if(!pCppObject)
{
g_warning("Failed to wrap object of type '%s'. Hint: this error is commonly caused by failing to call a library init() function.", G_OBJECT_TYPE_NAME(object));
- return 0;
+ return nullptr;
}
}