summaryrefslogtreecommitdiff
path: root/src/output.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.cc')
-rw-r--r--src/output.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/output.cc b/src/output.cc
index c6c8ecd7..2a8c8201 100644
--- a/src/output.cc
+++ b/src/output.cc
@@ -332,18 +332,19 @@ void report_tags::flush()
void report_tags::gather_metadata(item_t& item)
{
- if (item.metadata)
- foreach (const item_t::string_map::value_type& data, *item.metadata) {
- string tag(data.first);
- if (report.HANDLED(values) && data.second.first)
- tag += ": " + data.second.first.get().to_string();
-
- std::map<string, std::size_t>::iterator i = tags.find(tag);
- if (i == tags.end())
- tags.insert(tags_pair(tag, 1));
- else
- (*i).second++;
- }
+ if (! item.metadata)
+ return;
+ foreach (const item_t::string_map::value_type& data, *item.metadata) {
+ string tag(data.first);
+ if (report.HANDLED(values) && data.second.first)
+ tag += ": " + data.second.first.get().to_string();
+
+ std::map<string, std::size_t>::iterator i = tags.find(tag);
+ if (i == tags.end())
+ tags.insert(tags_pair(tag, 1));
+ else
+ (*i).second++;
+ }
}
void report_tags::operator()(post_t& post)