Remove types from this PR
MODIFY
include/vcpkg/binaryparagraph.h
include/vcpkg/binaryparagraph.h
@@ -40,7 +40,6 @@ namespace vcpkg
std::vector<std::string> default_features;
std::vector<std::string> depends;
std::string abi;
- SourceParagraph::TYPE type;
std::unordered_map<std::string, std::string> external_files;
mutable ConsistencyState consistency = ConsistencyState::UNKNOWN;

MODIFY
include/vcpkg/sourceparagraph.h
include/vcpkg/sourceparagraph.h
@@ -46,12 +46,6 @@ namespace vcpkg
/// </summary>
struct SourceParagraph
{
- enum TYPE : unsigned
- {
- PORT = 0,
- SYS_TOOL,
- };
-
std::string name;
std::string version;
std::string description;
@@ -60,10 +54,6 @@ namespace vcpkg
std::vector<std::string> supports;
std::vector<Dependency> depends;
std::vector<std::string> default_features;
- TYPE type;
-
- static TYPE type_from_string(const std::string& in);
- static std::string string_from_type(const TYPE& in);
};
/// <summary>

MODIFY
src/vcpkg/binaryparagraph.cpp
src/vcpkg/binaryparagraph.cpp
@@ -119,14 +119,14 @@ namespace vcpkg
}
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag)
- : version(spgh.version), description(spgh.description), maintainer(spgh.maintainer), abi(abi_tag), type(spgh.type)
+ : version(spgh.version), description(spgh.description), maintainer(spgh.maintainer), abi(abi_tag)
{
this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO);
this->depends = filter_dependencies(spgh.depends, triplet);
}
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet)
- : version(), description(fpgh.description), maintainer(), feature(fpgh.name), type(spgh.type)
+ : version(), description(fpgh.description), maintainer(), feature(fpgh.name)
{
this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO);
this->depends = filter_dependencies(fpgh.depends, triplet);

MODIFY
src/vcpkg/sourceparagraph.cpp
src/vcpkg/sourceparagraph.cpp
@@ -100,35 +100,6 @@ namespace vcpkg
}
}
- SourceParagraph::TYPE SourceParagraph::type_from_string(const std::string& in)
- {
- if (Strings::equals(in, "port") || Strings::equals(in, ""))
- {
- return SourceParagraph::PORT;
- }
-
- if (Strings::equals(in, "sys-tool"))
- {
- return SourceParagraph::SYS_TOOL;
- }
-
- System::print2(
- in, " is not a valid control file type. Valid types are:",
- "\n port\n sys-tool");
-
- Checks::exit_fail(VCPKG_LINE_INFO);
- }
-
- std::string SourceParagraph::string_from_type(const SourceParagraph::TYPE& in)
- {
- switch (in)
- {
- case SourceParagraph::PORT : return "port";
- case SourceParagraph::SYS_TOOL : return "sys-tool";
- default : Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid CONTROL_TYPE value.");
- }
- }
-
static ParseExpected<SourceParagraph> parse_source_paragraph(RawParagraph&& fields)
{
ParagraphParser parser(std::move(fields));
@@ -145,7 +116,6 @@ namespace vcpkg
parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS)));
spgh->supports = parse_comma_list(parser.optional_field(SourceParagraphFields::SUPPORTS));
spgh->default_features = parse_comma_list(parser.optional_field(SourceParagraphFields::DEFAULTFEATURES));
- spgh->type = SourceParagraph::type_from_string(parser.optional_field(SourceParagraphFields::TYPE));
auto err = parser.error_info(spgh->name);
if (err)

Remove types from this PR