aboutsummaryrefslogtreecommitdiff
path: root/toolsrc
diff options
context:
space:
mode:
authorCurtis.Bezault <curtbezault@gmail.com>2019-07-23 15:38:09 -0700
committerCurtis.Bezault <curtbezault@gmail.com>2019-07-23 15:38:09 -0700
commit81909e47d1f1563926e78d2e0f0764a3dc1bef03 (patch)
tree6f32d6e2912896727c51fc3d4b0db3a5d86180e1 /toolsrc
parent829f99b50624778ed1534e50fb04912d782fa4df (diff)
downloadvcpkg-81909e47d1f1563926e78d2e0f0764a3dc1bef03.tar.gz
vcpkg-81909e47d1f1563926e78d2e0f0764a3dc1bef03.zip
Remove types from this PR
Diffstat (limited to 'toolsrc')
-rw-r--r--toolsrc/include/vcpkg/binaryparagraph.h1
-rw-r--r--toolsrc/include/vcpkg/sourceparagraph.h10
-rw-r--r--toolsrc/src/vcpkg/binaryparagraph.cpp4
-rw-r--r--toolsrc/src/vcpkg/sourceparagraph.cpp30
4 files changed, 2 insertions, 43 deletions
diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h
index a95a68090..8099367c2 100644
--- a/toolsrc/include/vcpkg/binaryparagraph.h
+++ b/toolsrc/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;
diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h
index 9a1c2c843..9fbd83475 100644
--- a/toolsrc/include/vcpkg/sourceparagraph.h
+++ b/toolsrc/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>
diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp
index 7448d456b..9b1a8e201 100644
--- a/toolsrc/src/vcpkg/binaryparagraph.cpp
+++ b/toolsrc/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);
diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp
index 6af93a99b..5542ef923 100644
--- a/toolsrc/src/vcpkg/sourceparagraph.cpp
+++ b/toolsrc/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)