diff --git a/src/libs/clangsupport/filepathid.h b/src/libs/clangsupport/filepathid.h index a08a162ed59..38762bd44bf 100644 --- a/src/libs/clangsupport/filepathid.h +++ b/src/libs/clangsupport/filepathid.h @@ -51,10 +51,7 @@ public: friend bool operator==(FilePathId first, FilePathId second) { - return first.isValid() - && second.isValid() - && first.directoryId == second.directoryId - && first.filePathId == second.filePathId; + return first.isValid() && first.filePathId == second.filePathId; } friend bool operator!=(FilePathId first, FilePathId second) @@ -64,8 +61,7 @@ public: friend bool operator<(FilePathId first, FilePathId second) { - return std::tie(first.directoryId, first.filePathId) - < std::tie(second.directoryId, second.filePathId); + return first.filePathId < second.filePathId; } friend QDataStream &operator<<(QDataStream &out, const FilePathId &filePathId) diff --git a/tests/unit/unittest/projectpartqueue-test.cpp b/tests/unit/unittest/projectpartqueue-test.cpp index f13d0f55780..b6892df0872 100644 --- a/tests/unit/unittest/projectpartqueue-test.cpp +++ b/tests/unit/unittest/projectpartqueue-test.cpp @@ -43,26 +43,26 @@ protected: {"--er"}, {{"ER","2"}}, {"/bar"}, - {{2, 1}}, - {{2, 2}}}; + {{2, 3}}, + {{2, 4}}}; ClangBackEnd::V2::ProjectPartContainer projectPart2b{"ProjectPart2", {"--liang"}, {{"LIANG","3"}}, {"/liang"}, - {{2, 3}}, - {{2, 2}, {2, 4}}}; + {{2, 5}}, + {{2, 4}, {2, 6}}}; ClangBackEnd::V2::ProjectPartContainer projectPart3{"ProjectPart3", {"--san"}, {{"SAN","2"}}, {"/SAN"}, - {{3, 1}}, - {{3, 2}}}; + {{3, 7}}, + {{3, 8}}}; ClangBackEnd::V2::ProjectPartContainer projectPartMerged{"ProjectPart2", {"--liang"}, {{"LIANG","3"}}, {"/liang"}, - {{2, 1}, {2, 3}}, - {{2, 2}, {2, 4}}}; + {{2, 3}, {2, 5}}, + {{2, 4}, {2, 6}}}; }; TEST_F(ProjectPartQueue, AddProjectPart)