version_diff_t -> VersionDiff

This commit is contained in:
Alexander Karatarakis 2017-04-03 16:18:21 -07:00
parent b766a005b7
commit cbc2b08ad1
5 changed files with 10 additions and 10 deletions

View File

@ -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);
}

View File

@ -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;
};

View File

@ -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);

View File

@ -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;

View File

@ -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) });
}
}