Skip to content

Commit

Permalink
add dimension position to summary so things could be sorted if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 30, 2012
1 parent 5b53615 commit 8b36c55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/filters/Stats.cpp
Expand Up @@ -331,14 +331,15 @@ boost::property_tree::ptree Stats::toPTree() const
boost::property_tree::ptree tree;

std::multimap<DimensionPtr, stats::SummaryPtr>::const_iterator p;
boost::uint32_t position(0);
for (p = m_stats.begin(); p != m_stats.end(); ++p)
{

const stats::SummaryPtr stat = p->second;
boost::property_tree::ptree subtree = stat->toPTree();

subtree.add("position", position);
tree.add_child(p->first->getName(), subtree);

position++;
}

return tree;
Expand Down

0 comments on commit 8b36c55

Please sign in to comment.