Skip to content

Commit

Permalink
Remove to_version
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Jan 1, 2024
1 parent 364a768 commit 0054018
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions src/VersionReq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,6 @@ Comparator Comparator::parse(StringRef s) {
return parser.parse();
}

// Dangerously convert to Version. This method can lose the original
// information. Do not use unless it makes sense.
Version Comparator::to_version() const noexcept {
Version ver;
ver.major = major;
ver.minor = minor.value_or(0);
ver.patch = patch.value_or(0);
ver.pre = pre;
return ver;
}

String Comparator::to_string() const noexcept {
String result;
if (op.has_value()) {
Expand Down
1 change: 0 additions & 1 deletion src/VersionReq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ struct Comparator {
Prerelease pre;

static Comparator parse(StringRef);
Version to_version() const noexcept;
String to_string() const noexcept;
bool satisfiedBy(const Version&) const noexcept;
Comparator canonicalize() const noexcept;
Expand Down

0 comments on commit 0054018

Please sign in to comment.