Commit 07966845 authored by Tobias Hunger's avatar Tobias Hunger

CustomParser: Improve strange operator != implementation

Change-Id: I42c195004a9eca9f03cf34bd274f473ed87c580e
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent f1eb9c48
......@@ -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) :
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment