From 01b6141e4a21faa7ce85bdbe863327c7e757b0ee Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:02:56 +0100 Subject: [PATCH] Fix duplicate findtoken.h in lib/cppcheck.vcxproj (#7193) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Oliver Stöneberg --- lib/cppcheck.vcxproj | 1 - tools/dmake/dmake.cpp | 48 +++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/lib/cppcheck.vcxproj b/lib/cppcheck.vcxproj index b77deac42a4..a19b770596a 100644 --- a/lib/cppcheck.vcxproj +++ b/lib/cppcheck.vcxproj @@ -141,7 +141,6 @@ - diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index df833b6e750..3e32e788183 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -461,28 +461,27 @@ int main(int argc, char **argv) } // TODO: add files without source via parsing - std::vector libfiles_h; + std::set libfiles_h; for (const std::string &libfile : libfiles) { std::string fname(libfile.substr(4)); fname.erase(fname.find(".cpp")); - libfiles_h.emplace_back(fname + ".h"); + libfiles_h.emplace(fname + ".h"); } - libfiles_h.emplace_back("analyzer.h"); - libfiles_h.emplace_back("calculate.h"); - libfiles_h.emplace_back("config.h"); - libfiles_h.emplace_back("filesettings.h"); - libfiles_h.emplace_back("findtoken.h"); - libfiles_h.emplace_back("json.h"); - libfiles_h.emplace_back("matchcompiler.h"); - libfiles_h.emplace_back("precompiled.h"); - libfiles_h.emplace_back("smallvector.h"); - libfiles_h.emplace_back("sourcelocation.h"); - libfiles_h.emplace_back("tokenrange.h"); - libfiles_h.emplace_back("valueptr.h"); - libfiles_h.emplace_back("version.h"); - libfiles_h.emplace_back("vf_analyze.h"); - libfiles_h.emplace_back("xml.h"); - std::sort(libfiles_h.begin(), libfiles_h.end()); + libfiles_h.emplace("analyzer.h"); + libfiles_h.emplace("calculate.h"); + libfiles_h.emplace("config.h"); + libfiles_h.emplace("filesettings.h"); + libfiles_h.emplace("findtoken.h"); + libfiles_h.emplace("json.h"); + libfiles_h.emplace("matchcompiler.h"); + libfiles_h.emplace("precompiled.h"); + libfiles_h.emplace("smallvector.h"); + libfiles_h.emplace("sourcelocation.h"); + libfiles_h.emplace("tokenrange.h"); + libfiles_h.emplace("valueptr.h"); + libfiles_h.emplace("version.h"); + libfiles_h.emplace("vf_analyze.h"); + libfiles_h.emplace("xml.h"); std::vector clifiles_h; for (const std::string &clifile : clifiles) { @@ -493,13 +492,12 @@ int main(int argc, char **argv) clifiles_h.emplace_back(fname + ".h"); } - std::vector testfiles_h; - testfiles_h.emplace_back("fixture.h"); - testfiles_h.emplace_back("helpers.h"); - testfiles_h.emplace_back("options.h"); - testfiles_h.emplace_back("precompiled.h"); - testfiles_h.emplace_back("redirect.h"); - std::sort(testfiles_h.begin(), testfiles_h.end()); + std::set testfiles_h; + testfiles_h.emplace("fixture.h"); + testfiles_h.emplace("helpers.h"); + testfiles_h.emplace("options.h"); + testfiles_h.emplace("precompiled.h"); + testfiles_h.emplace("redirect.h"); // TODO: write filter files // Visual Studio projects