diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2015-11-22 19:21:03 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2015-11-22 19:21:03 +0100 |
commit | 53a70ee037ac16c4d450049ce4217cf6af175933 (patch) | |
tree | ca5f970fb0aba161f09919b9af5b82235b88eb2c /tools/pm | |
parent | badf0b20ee3b91c64204baafbe7922bf639fd017 (diff) | |
download | glibmm-53a70ee037ac16c4d450049ce4217cf6af175933.tar.gz |
gmmproc: Use nullptr instead of 0,NULL,zero in some comments
* tools/pm/DocsParser.pm: Replace NULL by nullptr, when C comments are
converted to C++ comments. In many cases "an empty string" would be a better
replacement text, but it's difficult to automatically decide when "nullptr"
is not correct.
* tools/pm/Output.pm: Use nullptr where appropriate in comments.
Diffstat (limited to 'tools/pm')
-rw-r--r-- | tools/pm/DocsParser.pm | 2 | ||||
-rw-r--r-- | tools/pm/Output.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/pm/DocsParser.pm b/tools/pm/DocsParser.pm index 8dae9c14..87431710 100644 --- a/tools/pm/DocsParser.pm +++ b/tools/pm/DocsParser.pm @@ -649,7 +649,7 @@ sub convert_tags_to_doxygen($) s"\%?\bFALSE\b"<tt>false</tt>"g; s"\%?\bTRUE\b"<tt>true</tt>"g; - s"\%?\bNULL\b"<tt>0</tt>"g; + s"\%?\bNULL\b"<tt>nullptr</tt>"g; s"#?\bgboolean\b"<tt>bool</tt>"g; s"#?\bg(int|short|long)\b"<tt>$1</tt>"g; diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm index bfb6f969..ef18385f 100644 --- a/tools/pm/Output.pm +++ b/tools/pm/Output.pm @@ -1203,7 +1203,7 @@ sub convert_args_cpp_to_c($$$$$) # will be passed by C reference (&name). $cOutputParamType =~ s/\*$//; - # Only initialize pointers to zero. Otherwise, use the default + # Only initialize pointers to nullptr. Otherwise, use the default # constructor of the type. my $initialization = ""; if($cOutputParamType =~ /\*$/) @@ -1284,7 +1284,7 @@ sub convert_args_cpp_to_c($$$$$) # Append the final slot copy parameter to the C function if the method # has a slot. The m4 macros assume that that parameter name is # "slot_copy". The m4 macros will either copy the slot to the - # "slot_copy variable or set it to the address of the slot itself if + # "slot_copy" variable or set it to the address of the slot itself if # the slot should not be copied. if ($$objCppfunc{slot_name}) { @@ -1525,7 +1525,7 @@ sub get_ctor_properties($$$$$$) if(!($possible_arg_list =~ /\b$cpp_param_index\b/)) { # If the C++ index is not found in the list of desired parameters, pass - # NULL to the C func unless the param is not optional. + # nullptr to the C func unless the param is not optional. if ($$cpp_param_flags[$cpp_param_index] & FLAG_PARAM_OPTIONAL) { push(@result, "nullptr"); |