mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 10:21:49 +08:00
21 lines
772 B
C++
21 lines
772 B
C++
#include "pch.h"
|
|
#include "VersionT.h"
|
|
#include "vcpkg_Strings.h"
|
|
|
|
namespace vcpkg
|
|
{
|
|
VersionT::VersionT() : value("0.0.0") {}
|
|
VersionT::VersionT(const std::string& value) : value(value) {}
|
|
bool operator==(const VersionT& left, const VersionT& right) { return left.value == right.value; }
|
|
bool operator!=(const VersionT& left, const VersionT& right) { return left.value != right.value; }
|
|
std::string to_printf_arg(const VersionT& version) { return version.value; }
|
|
|
|
VersionDiff::VersionDiff() : left(), right() {}
|
|
VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {}
|
|
|
|
std::string VersionDiff::to_string() const
|
|
{
|
|
return Strings::format("%s -> %s", left.value, right.value);
|
|
}
|
|
}
|