From ce8e6abe7fff563b11ab1e83e2bd83cbac5745f9 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 4 Sep 2012 21:10:05 +0200 Subject: Check for C++ operators that should be 'const' Make sure all C++ class comparison operators are const. Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d Reviewed-by: Thiago Macieira Reviewed-by: David Faure --- qmake/generators/makefiledeps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qmake/generators/makefiledeps.h') diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h index 7602b5ef4e..5eb66e9de4 100644 --- a/qmake/generators/makefiledeps.h +++ b/qmake/generators/makefiledeps.h @@ -63,10 +63,10 @@ public: inline const QString &real() const { return real_name; } const QString &local() const; - bool operator==(const QMakeLocalFileName &other) { + bool operator==(const QMakeLocalFileName &other) const { return (this->real_name == other.real_name); } - bool operator!=(const QMakeLocalFileName &other) { + bool operator!=(const QMakeLocalFileName &other) const { return !(*this == other); } }; -- cgit v1.2.3