aboutsummaryrefslogtreecommitdiff
path: root/paludis/stringify_formatter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/stringify_formatter.cc')
-rw-r--r--paludis/stringify_formatter.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/stringify_formatter.cc b/paludis/stringify_formatter.cc
index ab6061f36..beb0fdfa9 100644
--- a/paludis/stringify_formatter.cc
+++ b/paludis/stringify_formatter.cc
@@ -30,6 +30,7 @@ using namespace paludis;
StringifyFormatter::StringifyFormatter() :
Pimp<StringifyFormatter>(
static_cast<const CanFormat<std::string> *>(0),
+ static_cast<const CanFormat<std::pair<const std::string, std::string> > *>(0),
static_cast<const CanFormat<ChoiceValue> *>(0),
static_cast<const CanFormat<KeywordName> *>(0),
static_cast<const CanFormat<PackageDepSpec> *>(0),
@@ -63,6 +64,14 @@ StringifyFormatter::format(const std::string & s, const format::Plain & k) const
}
std::string
+StringifyFormatter::format(const std::pair<const std::string, std::string> & s, const format::Plain & k) const
+{
+ if (_imp->f_str)
+ return _imp->f_str_str->format(s, k);
+ return s.first + "=" + s.second;
+}
+
+std::string
StringifyFormatter::format(const KeywordName & s, const format::Accepted & k) const
{
if (_imp->f_keyword)