mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Use Strings::join() and Strings::format()
This commit is contained in:
parent
db06c7fa69
commit
35a9d223bc
@ -170,17 +170,10 @@ namespace vcpkg
|
||||
|
||||
std::string Dependency::name() const
|
||||
{
|
||||
std::string str = this->depend.name;
|
||||
if (this->depend.features.empty()) return str;
|
||||
if (this->depend.features.empty()) return this->depend.name;
|
||||
|
||||
str += "[";
|
||||
for (auto&& s : this->depend.features)
|
||||
{
|
||||
str += s + ",";
|
||||
}
|
||||
str.pop_back();
|
||||
str += "]";
|
||||
return str;
|
||||
const std::string features = Strings::join(",", this->depend.features);
|
||||
return Strings::format("%s[%s]", this->depend.name, features);
|
||||
}
|
||||
|
||||
std::vector<Dependency> vcpkg::expand_qualified_dependencies(const std::vector<std::string>& depends)
|
||||
|
Loading…
x
Reference in New Issue
Block a user