From 0a4ddce8227a5c08c36e46ca92f0b7a110cfa8e9 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 24 Dec 2018 19:05:00 +0100 Subject: [PATCH] c++: style: use consistently this/that instead of this/other * data/lalr1.cc, data/variant.hh: here. --- data/lalr1.cc | 6 +++--- data/variant.hh | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/data/lalr1.cc b/data/lalr1.cc index 21ec144f..c861f195 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -301,7 +301,7 @@ m4_define([b4_shared_declarations], by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. - by_state (const by_state& other) YY_NOEXCEPT; + by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. void clear () YY_NOEXCEPT; @@ -570,8 +570,8 @@ m4_if(b4_prefix, [yy], [], : state (empty_state) {} - ]b4_parser_class_name[::by_state::by_state (const by_state& other) YY_NOEXCEPT - : state (other.state) + ]b4_parser_class_name[::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) {} void diff --git a/data/variant.hh b/data/variant.hh index 545060e3..c613f597 100644 --- a/data/variant.hh +++ b/data/variant.hh @@ -196,7 +196,7 @@ m4_define([b4_value_type_declare], return *yyas_ (); } - /// 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 /// 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 (). template void - swap (self_type& other) YY_NOEXCEPT + swap (self_type& that) YY_NOEXCEPT {]b4_parse_assert_if([ YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *other.yytypeid_);])[ - std::swap (as (), other.as ()); + YYASSERT (*yytypeid_ == *that.yytypeid_);])[ + std::swap (as (), that.as ()); } - /// Move the content of \a other to this. + /// Move the content of \a that to this. /// - /// Destroys \a other. + /// Destroys \a that. template void - move (self_type& other) + move (self_type& that) { # if 201103L <= YY_CPLUSPLUS - emplace (std::move (other.as ())); + emplace (std::move (that.as ())); # else emplace (); - swap (other); + swap (that); # endif - other.destroy (); + that.destroy (); } # if 201103L <= YY_CPLUSPLUS - /// Move the content of \a other to this. + /// Move the content of \a that to this. template void - move (self_type&& other) + move (self_type&& that) { - emplace (std::move (other.as ())); - other.destroy (); + emplace (std::move (that.as ())); + that.destroy (); } #endif - /// Copy the content of \a other to this. + /// Copy the content of \a that to this. template void - copy (const self_type& other) + copy (const self_type& that) { - emplace (other.as ()); + emplace (that.as ()); } /// Destroy the stored \a T.