Address results of PVS-Studio static analysis

Couple are left un-addressed, see #958 for details.
This commit is contained in:
Martin Hořeňovský
2017-07-20 00:27:28 +02:00
parent 2a586437e8
commit 87a66b8479
24 changed files with 21335 additions and 38 deletions

View File

@@ -22,18 +22,15 @@ namespace Matchers {
class MatcherUntypedBase {
public:
std::string toString() const {
if( m_cachedToString.empty() )
m_cachedToString = describe();
return m_cachedToString;
}
MatcherUntypedBase() = default;
MatcherUntypedBase ( MatcherUntypedBase const& ) = default;
MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete;
std::string toString() const;
protected:
virtual ~MatcherUntypedBase();
virtual ~MatcherUntypedBase() = default;
virtual std::string describe() const = 0;
mutable std::string m_cachedToString;
private:
MatcherUntypedBase& operator = ( MatcherUntypedBase const& );
};
template<typename ObjectT>