mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
c++: style: use consistently this/that instead of this/other
* data/lalr1.cc, data/variant.hh: here.
This commit is contained in:
@@ -301,7 +301,7 @@ m4_define([b4_shared_declarations],
|
|||||||
by_state (kind_type s) YY_NOEXCEPT;
|
by_state (kind_type s) YY_NOEXCEPT;
|
||||||
|
|
||||||
/// Copy constructor.
|
/// Copy constructor.
|
||||||
by_state (const by_state& other) YY_NOEXCEPT;
|
by_state (const by_state& that) YY_NOEXCEPT;
|
||||||
|
|
||||||
/// Record that this symbol is empty.
|
/// Record that this symbol is empty.
|
||||||
void clear () YY_NOEXCEPT;
|
void clear () YY_NOEXCEPT;
|
||||||
@@ -570,8 +570,8 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
: state (empty_state)
|
: state (empty_state)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
]b4_parser_class_name[::by_state::by_state (const by_state& other) YY_NOEXCEPT
|
]b4_parser_class_name[::by_state::by_state (const by_state& that) YY_NOEXCEPT
|
||||||
: state (other.state)
|
: state (that.state)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ m4_define([b4_value_type_declare],
|
|||||||
return *yyas_<T> ();
|
return *yyas_<T> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Swap the content with \a other, of same type.
|
/// Swap the content with \a that, of same type.
|
||||||
///
|
///
|
||||||
/// Both variants must be built beforehand, because swapping the actual
|
/// Both variants must be built beforehand, because swapping the actual
|
||||||
/// data requires reading it (with as()), and this is not possible on
|
/// data requires reading it (with as()), and this is not possible on
|
||||||
@@ -206,46 +206,46 @@ m4_define([b4_value_type_declare],
|
|||||||
/// self_type::move ().
|
/// self_type::move ().
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
swap (self_type& other) YY_NOEXCEPT
|
swap (self_type& that) YY_NOEXCEPT
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([
|
||||||
YYASSERT (yytypeid_);
|
YYASSERT (yytypeid_);
|
||||||
YYASSERT (*yytypeid_ == *other.yytypeid_);])[
|
YYASSERT (*yytypeid_ == *that.yytypeid_);])[
|
||||||
std::swap (as<T> (), other.as<T> ());
|
std::swap (as<T> (), that.as<T> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Move the content of \a other to this.
|
/// Move the content of \a that to this.
|
||||||
///
|
///
|
||||||
/// Destroys \a other.
|
/// Destroys \a that.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
move (self_type& other)
|
move (self_type& that)
|
||||||
{
|
{
|
||||||
# if 201103L <= YY_CPLUSPLUS
|
# if 201103L <= YY_CPLUSPLUS
|
||||||
emplace<T> (std::move (other.as<T> ()));
|
emplace<T> (std::move (that.as<T> ()));
|
||||||
# else
|
# else
|
||||||
emplace<T> ();
|
emplace<T> ();
|
||||||
swap<T> (other);
|
swap<T> (that);
|
||||||
# endif
|
# endif
|
||||||
other.destroy<T> ();
|
that.destroy<T> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
# if 201103L <= YY_CPLUSPLUS
|
# if 201103L <= YY_CPLUSPLUS
|
||||||
/// Move the content of \a other to this.
|
/// Move the content of \a that to this.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
move (self_type&& other)
|
move (self_type&& that)
|
||||||
{
|
{
|
||||||
emplace<T> (std::move (other.as<T> ()));
|
emplace<T> (std::move (that.as<T> ()));
|
||||||
other.destroy<T> ();
|
that.destroy<T> ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Copy the content of \a other to this.
|
/// Copy the content of \a that to this.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
copy (const self_type& other)
|
copy (const self_type& that)
|
||||||
{
|
{
|
||||||
emplace<T> (other.as<T> ());
|
emplace<T> (that.as<T> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Destroy the stored \a T.
|
/// Destroy the stored \a T.
|
||||||
|
|||||||
Reference in New Issue
Block a user