aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-09 17:41:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-09 17:41:11 +0000
commit6837872ab88803893412e89cd2824189e634acc4 (patch)
treea2e7c21f03c6584db78ea37ddaac433f19b332e1 /doc
parent82ee0b8e135138b0ca7373afc9d57a002d6ec86a (diff)
downloadpaludis-6837872ab88803893412e89cd2824189e634acc4.tar.gz
paludis-6837872ab88803893412e89cd2824189e634acc4.tar.xz
Show map keys more elegantly
Diffstat (limited to 'doc')
-rw-r--r--doc/api/cplusplus/examples/example_metadata_key.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/api/cplusplus/examples/example_metadata_key.cc b/doc/api/cplusplus/examples/example_metadata_key.cc
index f61d5f3cf..2f803399e 100644
--- a/doc/api/cplusplus/examples/example_metadata_key.cc
+++ b/doc/api/cplusplus/examples/example_metadata_key.cc
@@ -34,7 +34,10 @@ namespace
std::string stringify_string_pair(const std::pair<const std::string, std::string> & s)
{
- return s.first + "=" + s.second;
+ if (s.first.empty())
+ return s.second;
+ else
+ return s.first + "=" + s.second;
}
/* We use this visitor to display extra information about a MetadataKey,