Delete useless MatcherMethod base class

All of its functionality can be moved into the `MatcherBase` class,
simplifying the code a bit and removing a warning about class with
virtual member functions but no virtual destructor.

Closes #2182 as it is no longer relevant.
This commit is contained in:
Martin Hořeňovský 2021-11-26 00:38:13 +01:00
parent 0ac9f44985
commit 153965a655
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 3 additions and 14 deletions

View File

@ -35,22 +35,11 @@ namespace Matchers {
mutable std::string m_cachedToString;
};
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
template<typename ObjectT>
struct MatcherMethod {
virtual bool match(ObjectT const& arg) const = 0;
};
#ifdef __clang__
# pragma clang diagnostic pop
#endif
template<typename T>
struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {};
struct MatcherBase : MatcherUntypedBase {
virtual bool match( T const& arg ) const = 0;
};
namespace Detail {