aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/BinaryParagraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/BinaryParagraph.cpp')
-rw-r--r--toolsrc/src/BinaryParagraph.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp
index 783fa6ace..1ab1aa63e 100644
--- a/toolsrc/src/BinaryParagraph.cpp
+++ b/toolsrc/src/BinaryParagraph.cpp
@@ -89,14 +89,8 @@ namespace vcpkg
std::string BinaryParagraph::displayname() const
{
- if (this->feature == "")
- {
- return this->spec.name() + "[core]:" + this->spec.triplet().to_string();
- }
- else
- {
- return this->spec.name() + "[" + this->feature + "]:" + this->spec.triplet().to_string();
- }
+ const auto f = Strings::is_empty(this->feature) ? "core" : this->feature;
+ return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet());
}
std::string BinaryParagraph::dir() const { return this->spec.dir(); }