2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 Sergey Morozov
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2019-11-03 23:00:16 +03:00
|
|
|
|
|
|
|
|
#include "cppcheckdiagnostic.h"
|
|
|
|
|
|
|
|
|
|
namespace Cppcheck {
|
|
|
|
|
namespace 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);
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-13 09:27:18 +02:00
|
|
|
size_t qHash(const Diagnostic &diagnostic)
|
2019-11-03 23:00:16 +03:00
|
|
|
{
|
|
|
|
|
return qHash(diagnostic.message) ^ qHash(diagnostic.fileName) ^ diagnostic.lineNumber;
|
|
|
|
|
}
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Cppcheck
|