mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
version_diff_t -> VersionDiff
This commit is contained in:
parent
b766a005b7
commit
cbc2b08ad1
@ -10,10 +10,10 @@ namespace vcpkg
|
||||
bool operator!=(const VersionT& left, const VersionT& right) { return left.value != right.value; }
|
||||
std::string to_printf_arg(const VersionT& version) { return version.value; }
|
||||
|
||||
version_diff_t::version_diff_t() : left(), right() {}
|
||||
version_diff_t::version_diff_t(const VersionT& left, const VersionT& right) : left(left), right(right) {}
|
||||
VersionDiff::VersionDiff() : left(), right() {}
|
||||
VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {}
|
||||
|
||||
std::string version_diff_t::toString() const
|
||||
std::string VersionDiff::toString() const
|
||||
{
|
||||
return Strings::format("%s -> %s", left.value, right.value);
|
||||
}
|
||||
|
@ -15,13 +15,13 @@ namespace vcpkg
|
||||
bool operator !=(const VersionT& left, const VersionT& right);
|
||||
std::string to_printf_arg(const VersionT& version);
|
||||
|
||||
struct version_diff_t
|
||||
struct VersionDiff
|
||||
{
|
||||
VersionT left;
|
||||
VersionT right;
|
||||
|
||||
version_diff_t();
|
||||
version_diff_t(const VersionT& left, const VersionT& right);
|
||||
VersionDiff();
|
||||
VersionDiff(const VersionT& left, const VersionT& right);
|
||||
|
||||
std::string toString() const;
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ namespace vcpkg::Commands
|
||||
static bool compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right);
|
||||
|
||||
PackageSpec spec;
|
||||
version_diff_t version_diff;
|
||||
VersionDiff version_diff;
|
||||
};
|
||||
|
||||
std::vector<OutdatedPackage> find_outdated_packages(const vcpkg_paths& paths, const StatusParagraphs& status_db);
|
||||
|
@ -16,7 +16,7 @@ namespace vcpkg::Commands::PortsDiff
|
||||
}
|
||||
|
||||
std::string port;
|
||||
version_diff_t version_diff;
|
||||
VersionDiff version_diff;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
@ -52,7 +52,7 @@ namespace vcpkg::Commands::PortsDiff
|
||||
continue;
|
||||
}
|
||||
|
||||
output.push_back({ name, version_diff_t(previous_version, current_version) });
|
||||
output.push_back({ name, VersionDiff(previous_version, current_version) });
|
||||
}
|
||||
|
||||
return output;
|
||||
|
@ -29,7 +29,7 @@ namespace vcpkg::Commands::Update
|
||||
}
|
||||
if (it->second != pgh->package.version)
|
||||
{
|
||||
output.push_back({ pgh->package.spec, version_diff_t(pgh->package.version, it->second) });
|
||||
output.push_back({ pgh->package.spec, VersionDiff(pgh->package.version, it->second) });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user