From 599c22f2affc863ab4acebbc465c563c6fe11d8b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 7 Apr 2017 17:56:26 -0700 Subject: VersionT: replace to_printf_arg() with .to_string() --- toolsrc/include/VersionT.cpp | 1 + toolsrc/include/VersionT.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/VersionT.cpp b/toolsrc/include/VersionT.cpp index c51052b98..6ea5d3810 100644 --- a/toolsrc/include/VersionT.cpp +++ b/toolsrc/include/VersionT.cpp @@ -6,6 +6,7 @@ namespace vcpkg { VersionT::VersionT() : value("0.0.0") {} VersionT::VersionT(const std::string& value) : value(value) {} + std::string VersionT::to_string() const { return 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; } diff --git a/toolsrc/include/VersionT.h b/toolsrc/include/VersionT.h index aa2635855..36d050e08 100644 --- a/toolsrc/include/VersionT.h +++ b/toolsrc/include/VersionT.h @@ -8,12 +8,13 @@ namespace vcpkg VersionT(); VersionT(const std::string& value); + std::string to_string() const; + std::string value; }; bool operator ==(const VersionT& left, const VersionT& right); bool operator !=(const VersionT& left, const VersionT& right); - std::string to_printf_arg(const VersionT& version); struct VersionDiff { -- cgit v1.2.3