[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] c++: minor stylistic changes
From: |
Theophile Ranquet |
Subject: |
[PATCH 1/2] c++: minor stylistic changes |
Date: |
Mon, 28 Jan 2013 20:29:11 +0100 |
* data/c++m4: Remove useless comment lines.
* data/variant.hh (self_type): Use this typedef instead of variant<S>.
(b4_symbol_constructor_define_): Remove commented-out line, and stylistic
change (avoid blank line).
---
data/c++.m4 | 2 --
data/variant.hh | 11 +++++------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/data/c++.m4 b/data/c++.m4
index fcfda23..d134eb8 100644
--- a/data/c++.m4
+++ b/data/c++.m4
@@ -210,14 +210,12 @@ m4_define([b4_public_types_declare],
by_type (const by_type& other);
/// Constructor.
- ///
by_type (token_type t);
/// Steal the type of \a that.
void move (by_type& that);
/// The symbol type.
- ///
/// -1 when this symbol is empty.
int type;
diff --git a/data/variant.hh b/data/variant.hh
index da0d2a3..84ea779 100644
--- a/data/variant.hh
+++ b/data/variant.hh
@@ -173,7 +173,7 @@ m4_define([b4_variant_define],
/// variant::move ().
template <typename T>
void
- swap (variant<S>& 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 <typename T>
void
- move (variant<S>& other)
+ move (self_type& other)
{]b4_parse_assert_if([
YYASSERT (! built);])[
build<T>();
@@ -197,7 +197,7 @@ m4_define([b4_variant_define],
/// Copy the content of \a other to this.
template <typename T>
void
- copy (const variant<S>& other)
+ copy (const self_type& other)
{
build<T> (other.as<T> ());
}
@@ -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;
}
]])])])
--
1.8.1.1
- [PATCH 1/2] c++: minor stylistic changes,
Theophile Ranquet <=