forked from qt-creator/qt-creator
CustomParser: Improve strange operator != implementation
Change-Id: I42c195004a9eca9f03cf34bd274f473ed87c580e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -43,18 +43,10 @@ CustomParserSettings::CustomParserSettings() :
|
|||||||
messageCap(3)
|
messageCap(3)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool CustomParserSettings::operator !=(const CustomParserSettings &other) const
|
bool CustomParserSettings::operator ==(const CustomParserSettings &other) const
|
||||||
{
|
{
|
||||||
if (errorPattern == other.errorPattern)
|
return errorPattern == other.errorPattern && fileNameCap == other.fileNameCap
|
||||||
return false;
|
&& lineNumberCap == other.lineNumberCap && messageCap == other.messageCap;
|
||||||
if (fileNameCap == other.fileNameCap)
|
|
||||||
return false;
|
|
||||||
if (lineNumberCap == other.lineNumberCap)
|
|
||||||
return false;
|
|
||||||
if (messageCap == other.messageCap)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomParser::CustomParser(const CustomParserSettings &settings) :
|
CustomParser::CustomParser(const CustomParserSettings &settings) :
|
||||||
|
@@ -43,7 +43,8 @@ class CustomParserSettings
|
|||||||
public:
|
public:
|
||||||
CustomParserSettings();
|
CustomParserSettings();
|
||||||
|
|
||||||
bool operator !=(const CustomParserSettings &other) const;
|
bool operator ==(const CustomParserSettings &other) const;
|
||||||
|
bool operator !=(const CustomParserSettings &other) const { return !operator==(other); }
|
||||||
|
|
||||||
QString errorPattern;
|
QString errorPattern;
|
||||||
int fileNameCap;
|
int fileNameCap;
|
||||||
|
Reference in New Issue
Block a user