[glibmm] gmmproc: Use nullptr instead of 0, NULL, zero in some comments
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] gmmproc: Use nullptr instead of 0, NULL, zero in some comments
- Date: Sun, 22 Nov 2015 18:32:37 +0000 (UTC)
commit 53a70ee037ac16c4d450049ce4217cf6af175933
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Nov 22 19:21:03 2015 +0100
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.
tools/pm/DocsParser.pm | 2 +-
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 8dae9c1..8743171 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 bfb6f96..ef18385 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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]