forked from qt-creator/qt-creator
Change-Id: I5e6583984f7dc94e998df3c20840f2ba2e801ab8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
20 lines
555 B
C++
20 lines
555 B
C++
// Copyright (C) 2019 Sergey Morozov
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
#include "cppcheckdiagnostic.h"
|
|
|
|
namespace Cppcheck::Internal {
|
|
|
|
bool Diagnostic::operator==(const Diagnostic &r) const
|
|
{
|
|
return std::tie(severity, message, fileName, lineNumber)
|
|
== std::tie(r.severity, r.message, r.fileName, r.lineNumber);
|
|
}
|
|
|
|
size_t qHash(const Diagnostic &diagnostic)
|
|
{
|
|
return qHash(diagnostic.message) ^ qHash(diagnostic.fileName) ^ diagnostic.lineNumber;
|
|
}
|
|
|
|
} // namespace Cppcheck
|