mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-01 13:37:55 +08:00
Add compare_by_name to InstallPlan
This commit is contained in:
parent
1281f66c39
commit
c85de257c8
@ -40,6 +40,8 @@ namespace vcpkg::Dependencies
|
||||
|
||||
struct PackageSpecWithInstallPlan
|
||||
{
|
||||
static bool compare_by_name(const PackageSpecWithInstallPlan* left, const PackageSpecWithInstallPlan* right);
|
||||
|
||||
PackageSpecWithInstallPlan(const PackageSpec& spec, InstallPlanAction&& plan);
|
||||
|
||||
PackageSpec spec;
|
||||
|
@ -26,6 +26,10 @@ namespace vcpkg::Dependencies
|
||||
|
||||
InstallPlanAction::InstallPlanAction(const InstallPlanType& plan_type, Optional<BinaryParagraph> binary_pgh, Optional<SourceParagraph> source_pgh)
|
||||
: plan_type(std::move(plan_type)), binary_pgh(std::move(binary_pgh)), source_pgh(std::move(source_pgh)) { }
|
||||
bool PackageSpecWithInstallPlan::compare_by_name(const PackageSpecWithInstallPlan* left, const PackageSpecWithInstallPlan* right)
|
||||
{
|
||||
return left->spec.name() < right->spec.name();
|
||||
}
|
||||
|
||||
PackageSpecWithInstallPlan::PackageSpecWithInstallPlan(const PackageSpec& spec, InstallPlanAction&& plan) : spec(spec), plan(std::move(plan)) { }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user