diff --git a/src/plugins/projectexplorer/customparser.cpp b/src/plugins/projectexplorer/customparser.cpp index 15aebda4877..3622f24994e 100644 --- a/src/plugins/projectexplorer/customparser.cpp +++ b/src/plugins/projectexplorer/customparser.cpp @@ -43,18 +43,10 @@ CustomParserSettings::CustomParserSettings() : messageCap(3) { } -bool CustomParserSettings::operator !=(const CustomParserSettings &other) const +bool CustomParserSettings::operator ==(const CustomParserSettings &other) const { - if (errorPattern == other.errorPattern) - return false; - if (fileNameCap == other.fileNameCap) - return false; - if (lineNumberCap == other.lineNumberCap) - return false; - if (messageCap == other.messageCap) - return false; - - return true; + return errorPattern == other.errorPattern && fileNameCap == other.fileNameCap + && lineNumberCap == other.lineNumberCap && messageCap == other.messageCap; } CustomParser::CustomParser(const CustomParserSettings &settings) : diff --git a/src/plugins/projectexplorer/customparser.h b/src/plugins/projectexplorer/customparser.h index 0aece8a8e6a..933826a023b 100644 --- a/src/plugins/projectexplorer/customparser.h +++ b/src/plugins/projectexplorer/customparser.h @@ -43,7 +43,8 @@ class CustomParserSettings public: CustomParserSettings(); - bool operator !=(const CustomParserSettings &other) const; + bool operator ==(const CustomParserSettings &other) const; + bool operator !=(const CustomParserSettings &other) const { return !operator==(other); } QString errorPattern; int fileNameCap;