This commit is contained in:
Alexander Karatarakis 2018-05-16 15:30:26 -07:00
parent 9b758690cd
commit f69cce7051
3 changed files with 6 additions and 6 deletions

View File

@ -139,7 +139,7 @@ namespace vcpkg::Commands
namespace Fetch
{
std::vector<Toolset> find_toolset_instances_prefered_first(const VcpkgPaths& paths);
std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths);
fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool);
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
}

View File

@ -647,7 +647,7 @@ namespace vcpkg::Commands::Fetch
LEGACY
};
static bool prefered_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right)
static bool preferred_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right)
{
const auto get_preference_weight = [](const ReleaseType& type) -> int {
switch (type)
@ -747,7 +747,7 @@ namespace vcpkg::Commands::Fetch
}
#if defined(_WIN32)
std::vector<Toolset> find_toolset_instances_prefered_first(const VcpkgPaths& paths)
std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths)
{
using CPU = System::CPUArchitecture;
@ -760,7 +760,7 @@ namespace vcpkg::Commands::Fetch
std::vector<Toolset> excluded_toolsets;
const SortedVector<VisualStudioInstance> sorted{get_visual_studio_instances(paths),
VisualStudioInstance::prefered_first_comparator};
VisualStudioInstance::preferred_first_comparator};
const bool v140_is_available = Util::find_if(sorted, [&](const VisualStudioInstance& vs_instance) {
return vs_instance.major_version() == "14";

View File

@ -117,8 +117,8 @@ namespace vcpkg
#if !defined(_WIN32)
Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot build windows triplets from non-windows.");
#else
const std::vector<Toolset>& vs_toolsets =
this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances_prefered_first(*this); });
const std::vector<Toolset>& vs_toolsets = this->toolsets.get_lazy(
[this]() { return Commands::Fetch::find_toolset_instances_preferred_first(*this); });
std::vector<const Toolset*> candidates = Util::element_pointers(vs_toolsets);
const auto tsv = prebuildinfo.platform_toolset.get();