diff options
author | Abseil Team <absl-team@google.com> | 2018-12-03 16:30:02 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-12-03 17:54:11 (GMT) |
commit | 26743363be8f579ee7d637e5b15cbf73e9e18a4a (patch) | |
tree | fb89238693dad174c6ddaf57f04bae3c8f41d7fb /googletest/include/gtest/gtest-matchers.h | |
parent | a42cdf2abdc0ab7ddfbafc098cafdd6152ae1b70 (diff) | |
download | googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.zip googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.tar.gz googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.tar.bz2 |
Googletest export
Applied fixes for ClangTidy modernize-use-override and modernize-use-using.
PiperOrigin-RevId: 223800219
Diffstat (limited to 'googletest/include/gtest/gtest-matchers.h')
-rw-r--r-- | googletest/include/gtest/gtest-matchers.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h index 4601fbe..9bcf5ac 100644 --- a/googletest/include/gtest/gtest-matchers.h +++ b/googletest/include/gtest/gtest-matchers.h @@ -183,16 +183,16 @@ class MatcherInterfaceAdapter : public MatcherInterface<const T&> { public: explicit MatcherInterfaceAdapter(const MatcherInterface<T>* impl) : impl_(impl) {} - virtual ~MatcherInterfaceAdapter() { delete impl_; } + ~MatcherInterfaceAdapter() override { delete impl_; } - virtual void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + void DescribeTo(::std::ostream* os) const override { impl_->DescribeTo(os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream* os) const override { impl_->DescribeNegationTo(os); } - virtual bool MatchAndExplain(const T& x, - MatchResultListener* listener) const { + bool MatchAndExplain(const T& x, + MatchResultListener* listener) const override { return impl_->MatchAndExplain(x, listener); } @@ -614,18 +614,19 @@ class ComparisonBase { class Impl : public MatcherInterface<Lhs> { public: explicit Impl(const Rhs& rhs) : rhs_(rhs) {} - virtual bool MatchAndExplain( - Lhs lhs, MatchResultListener* /* listener */) const { + bool MatchAndExplain(Lhs lhs, + MatchResultListener* /* listener */) const override { return Op()(lhs, rhs_); } - virtual void DescribeTo(::std::ostream* os) const { + void DescribeTo(::std::ostream* os) const override { *os << D::Desc() << " "; UniversalPrint(rhs_, os); } - virtual void DescribeNegationTo(::std::ostream* os) const { + void DescribeNegationTo(::std::ostream* os) const override { *os << D::NegatedDesc() << " "; UniversalPrint(rhs_, os); } + private: Rhs rhs_; GTEST_DISALLOW_ASSIGN_(Impl); |