diff options
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 4f998d579..0903c2d76 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,14 +91,7 @@ namespace vcpkg const fs::path& VcpkgPaths::get_tool_exe(const std::string& tool) const { - const auto it = this->tool_paths.find(tool); - if (it != this->tool_paths.cend()) - { - return it->second; - } - - this->tool_paths[tool] = Commands::Fetch::get_tool_path(*this, tool); - return this->tool_paths[tool]; + return this->tool_paths.get_lazy(tool, [&]() { return Commands::Fetch::get_tool_path(*this, tool); }); } const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const |
