summaryrefslogtreecommitdiff
path: root/tools/extra_defs_gen/generate_extra_defs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/extra_defs_gen/generate_extra_defs.cc')
-rw-r--r--tools/extra_defs_gen/generate_extra_defs.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/extra_defs_gen/generate_extra_defs.cc b/tools/extra_defs_gen/generate_extra_defs.cc
index f209348c..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.
@@ -220,16 +220,16 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
{
strResult += " (parameters\n";
- for(unsigned i = 0; i < signalQuery.n_params; i++)
+ for(unsigned j = 0; j < signalQuery.n_params; j++)
{
- GType typeParamMangled = pParameters[i];
+ GType typeParamMangled = pParameters[j];
//Parameter name:
//We can't get the real parameter name from the GObject system. It's not registered with g_signal_new().
- gchar* pchNum = g_strdup_printf("%d", i);
+ 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.