Fix clang -Winconsistent-missing-override
warnings
`DescribeTo(..)` and `MatchAndExplain(..)` in `gmock-matchers_test` both override virtual methods. Remove the `virtual` keyword and apply `override` to them instead. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
This commit is contained in:
parent
d850e14471
commit
2147806d2d
@ -6943,10 +6943,10 @@ TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) {
|
|||||||
// For testing Args<>'s explanation.
|
// For testing Args<>'s explanation.
|
||||||
class LessThanMatcher : public MatcherInterface<std::tuple<char, int> > {
|
class LessThanMatcher : public MatcherInterface<std::tuple<char, int> > {
|
||||||
public:
|
public:
|
||||||
virtual void DescribeTo(::std::ostream* os) const {}
|
void DescribeTo(::std::ostream* os) const override {}
|
||||||
|
|
||||||
virtual bool MatchAndExplain(std::tuple<char, int> value,
|
bool MatchAndExplain(std::tuple<char, int> value,
|
||||||
MatchResultListener* listener) const {
|
MatchResultListener* listener) const override {
|
||||||
const int diff = std::get<0>(value) - std::get<1>(value);
|
const int diff = std::get<0>(value) - std::get<1>(value);
|
||||||
if (diff > 0) {
|
if (diff > 0) {
|
||||||
*listener << "where the first value is " << diff
|
*listener << "where the first value is " << diff
|
||||||
|
Loading…
Reference in New Issue
Block a user