diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-08-28 18:55:27 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-08-28 19:54:01 -0700 |
| commit | 4a6b43c15a2b6c121686355f37443da6e2d05c9b (patch) | |
| tree | d79fd86343ad7d9c771327e9372a673b5ac03434 /toolsrc/src/BinaryParagraph.cpp | |
| parent | f3d803addfb3d84d828786d2e6b0b8a34f2fc494 (diff) | |
| download | vcpkg-4a6b43c15a2b6c121686355f37443da6e2d05c9b.tar.gz vcpkg-4a6b43c15a2b6c121686355f37443da6e2d05c9b.zip | |
Improve BinaryParagraph::displayname()
Diffstat (limited to 'toolsrc/src/BinaryParagraph.cpp')
| -rw-r--r-- | toolsrc/src/BinaryParagraph.cpp | 10 |
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(); } |
