From 2c276442b752f7fdec3732333ecc9731c0dde529 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Fri, 21 Jun 2019 16:38:27 -0700 Subject: [PATCH] Remove unused code --- toolsrc/include/vcpkg/paragraphs.h | 4 -- toolsrc/src/vcpkg/paragraphs.cpp | 59 ------------------------------ 2 files changed, 63 deletions(-) diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index 7b6bc512b5..56f09387aa 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -29,8 +29,4 @@ namespace vcpkg::Paragraphs std::vector> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - - std::vector> - load_all_ports_from_dirs(const Files::Filesystem& fs, - const std::vector& ports_dirs_paths); } diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index d82fcee3a0..21ef2c4d9c 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -286,63 +286,4 @@ namespace vcpkg::Paragraphs } return std::move(results.paragraphs); } - - std::vector> - load_all_ports_from_dirs(const Files::Filesystem& fs, - const std::vector& ports_dirs_paths) - { - std::set found_ports; - std::vector> ret; - - for (auto&& ports_path : ports_dirs_paths) - { - if (ports_path.empty()) - { - continue; - } - - auto overlay = fs::stdfs::canonical(fs::u8path(ports_path)); - - Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(overlay), - "Error: Path \"%s\" does not exist", - overlay.string()); - - Checks::check_exit(VCPKG_LINE_INFO, - fs::stdfs::is_directory(overlay), - "Error: Path \"%s\" must be a directory", - overlay.string()); - - // Is overlay an individual port? - auto maybe_scf = Paragraphs::try_load_port(fs, overlay); - if (auto scf = maybe_scf.get()) - { - if (scf->get()) - { - auto&& port_name = scf->get()->core_paragraph->name; - if (!found_ports.count(port_name)) - { - found_ports.insert(port_name); - ret.emplace_back(std::move(*scf)); - } - continue; - } - } - - auto found_scf = Paragraphs::load_all_ports(fs, overlay); - for (auto&& scf : found_scf) - { - if (scf.get()) - { - auto&& port_name = scf.get()->core_paragraph->name; - if (!found_ports.count(port_name)) - { - found_ports.insert(port_name); - ret.emplace_back(std::move(scf)); - } - } - } - } - return ret; - } }