From 3d70de93822fccca00ab332eac926c1c8088f4a5 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 4 Oct 2022 14:50:32 +0200 Subject: [PATCH] VcsInfo: Remove unneeded c'tor and operator== Change-Id: I6b2a797290854bd34abc6680d5377749678ef687 Reviewed-by: Orgad Shaneh --- src/plugins/coreplugin/vcsmanager.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index 7de1280f538..de63fd0c4e2 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -44,16 +44,6 @@ class VcsManagerPrivate public: class VcsInfo { public: - VcsInfo() = default; - VcsInfo(IVersionControl *vc, const QString &tl) : - versionControl(vc), topLevel(tl) - { } - - bool operator == (const VcsInfo &other) const - { - return versionControl == other.versionControl && topLevel == other.topLevel; - } - IVersionControl *versionControl = nullptr; QString topLevel; }; @@ -99,7 +89,7 @@ public: QString tmpDir = dir; const QChar slash = QLatin1Char('/'); while (tmpDir.count() >= topLevel.count() && !tmpDir.isEmpty()) { - m_cachedMatches.insert(tmpDir, VcsInfo(vc, topLevel)); + m_cachedMatches.insert(tmpDir, {vc, topLevel}); // if no vc was found, this might mean we're inside a repo internal directory (.git) // Cache only input directory, not parents if (!vc)