mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 16:43:02 +08:00
Triplet.to_string()
This commit is contained in:
parent
9c2287d0e8
commit
13482879f8
@ -15,10 +15,9 @@ namespace vcpkg
|
||||
static const Triplet ARM_UWP;
|
||||
|
||||
const std::string& canonical_name() const;
|
||||
|
||||
std::string architecture() const;
|
||||
|
||||
std::string system() const;
|
||||
const std::string& to_string() const;
|
||||
|
||||
private:
|
||||
std::string m_canonical_name;
|
||||
@ -28,10 +27,6 @@ namespace vcpkg
|
||||
|
||||
bool operator!=(const Triplet& left, const Triplet& right);
|
||||
|
||||
std::string to_string(const Triplet& spec);
|
||||
|
||||
std::string to_printf_arg(const Triplet& spec);
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Triplet& spec);
|
||||
}
|
||||
|
||||
|
@ -11,16 +11,6 @@ namespace vcpkg
|
||||
const Triplet Triplet::X64_UWP = from_canonical_name("x64-uwp");
|
||||
const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp");
|
||||
|
||||
std::string to_string(const Triplet& t)
|
||||
{
|
||||
return t.canonical_name();
|
||||
}
|
||||
|
||||
std::string to_printf_arg(const Triplet& t)
|
||||
{
|
||||
return to_string(t);
|
||||
}
|
||||
|
||||
bool operator==(const Triplet& left, const Triplet& right)
|
||||
{
|
||||
return left.canonical_name() == right.canonical_name();
|
||||
@ -33,7 +23,7 @@ namespace vcpkg
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Triplet& t)
|
||||
{
|
||||
return os << to_string(t);
|
||||
return os << t.to_string();
|
||||
}
|
||||
|
||||
Triplet Triplet::from_canonical_name(const std::string& triplet_as_string)
|
||||
@ -63,4 +53,9 @@ namespace vcpkg
|
||||
auto it = std::find(this->m_canonical_name.cbegin(), this->m_canonical_name.cend(), '-');
|
||||
return std::string(it + 1, this->m_canonical_name.cend());
|
||||
}
|
||||
|
||||
const std::string& Triplet::to_string() const
|
||||
{
|
||||
return this->m_canonical_name;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user