From 858666c44302b355ff0cad76b457d57659306d6f Mon Sep 17 00:00:00 2001 From: Theophile Ranquet Date: Mon, 28 Jan 2013 18:03:58 +0100 Subject: [PATCH] c++: minor stylistic changes * data/c++m4: Remove useless comment lines. * data/variant.hh (self_type): Use this typedef instead of variant. (b4_symbol_constructor_define_): Remove commented-out line, and stylistic change (avoid blank line). --- data/c++.m4 | 1 - data/variant.hh | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/data/c++.m4 b/data/c++.m4 index 87bc5e0d..14eb42ac 100644 --- a/data/c++.m4 +++ b/data/c++.m4 @@ -234,7 +234,6 @@ m4_define([b4_public_types_declare], enum { empty = 0 }; /// The symbol type. - /// /// -1 when this symbol is empty. token_number_type type; }; diff --git a/data/variant.hh b/data/variant.hh index da0d2a39..84ea7798 100644 --- a/data/variant.hh +++ b/data/variant.hh @@ -173,7 +173,7 @@ m4_define([b4_variant_define], /// variant::move (). template void - swap (variant& other) + swap (self_type& other) {]b4_parse_assert_if([ YYASSERT (built); YYASSERT (other.built); @@ -186,7 +186,7 @@ m4_define([b4_variant_define], /// Destroys \a other. template void - move (variant& other) + move (self_type& other) {]b4_parse_assert_if([ YYASSERT (! built);])[ build(); @@ -197,7 +197,7 @@ m4_define([b4_variant_define], /// Copy the content of \a other to this. template void - copy (const variant& other) + copy (const self_type& other) { build (other.as ()); } @@ -314,9 +314,8 @@ b4_join(b4_symbol_if([$1], [has_type], b4_locations_if([const location_type& l])))[ { symbol_type res (token::]b4_symbol([$1], [id])[]b4_locations_if([, l])[); - ]b4_symbol_if([$1], [has_type], [res.value.build (v);])[ - // ]b4_locations_if([res.location = l;])[ - return res; + ]b4_symbol_if([$1], [has_type], [res.value.build (v); + ])[return res; } ]])])]) -- 2.45.2