From 3314845a92852d3461a86d15ca5d6b2a6ca859eb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 27 Jun 2018 16:29:16 -0700 Subject: [vcpkg] Remove calls to where.exe to improve startup performance --- toolsrc/include/vcpkg/base/files.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 1518d2b5c..eee910841 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -57,13 +57,9 @@ namespace vcpkg::Files std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; - inline void write_contents(const fs::path& file_path, const std::string& data) - { - std::error_code ec; - write_contents(file_path, data, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); - } + virtual std::vector find_from_PATH(const std::string& name) const = 0; + + void write_contents(const fs::path& file_path, const std::string& data); }; Filesystem& get_real_filesystem(); @@ -73,6 +69,4 @@ namespace vcpkg::Files bool has_invalid_chars_for_filesystem(const std::string& s); void print_paths(const std::vector& paths); - - std::vector find_from_PATH(const std::string& name); } -- cgit v1.2.3