|
|
@ -179,9 +179,9 @@ public:
|
|
|
|
addDwarfActivity(unit, *entry);
|
|
|
|
addDwarfActivity(unit, *entry);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for_each_(dwarf_activity_values[unit],
|
|
|
|
auto &values = dwarf_activity_values[unit];
|
|
|
|
[&] (const pair<activity_type, size_t> &x)
|
|
|
|
for (auto it = values.begin(); it != values.end(); ++it)
|
|
|
|
{ dwarf_activity_values[unit][x.first] = getPercentage(x.second, dwarf_total); } );
|
|
|
|
it->second = getPercentage(it->second, dwarf_total);
|
|
|
|
|
|
|
|
|
|
|
|
dwarves_column.add(getUnitName(unit), unit);
|
|
|
|
dwarves_column.add(getUnitName(unit), unit);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -212,9 +212,8 @@ public:
|
|
|
|
vector<pair<activity_type, size_t>> rev_vec(dwarf_activities->begin(), dwarf_activities->end());
|
|
|
|
vector<pair<activity_type, size_t>> rev_vec(dwarf_activities->begin(), dwarf_activities->end());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<activity_type, size_t>());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<activity_type, size_t>());
|
|
|
|
|
|
|
|
|
|
|
|
for_each_(rev_vec,
|
|
|
|
for (auto it = rev_vec.begin(); it != rev_vec.end(); ++it)
|
|
|
|
[&] (pair<activity_type, size_t> x)
|
|
|
|
dwarf_activity_column.add(getActivityItem(it->first, it->second), it->first);
|
|
|
|
{ dwarf_activity_column.add(getActivityItem(x.first, x.second), x.first); });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dwarf_activity_column.fixWidth();
|
|
|
|
dwarf_activity_column.fixWidth();
|
|
|
@ -754,9 +753,8 @@ public:
|
|
|
|
vector<pair<df::unit *, size_t>> rev_vec(dwarf_activities->begin(), dwarf_activities->end());
|
|
|
|
vector<pair<df::unit *, size_t>> rev_vec(dwarf_activities->begin(), dwarf_activities->end());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<df::unit *, size_t>());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<df::unit *, size_t>());
|
|
|
|
|
|
|
|
|
|
|
|
for_each_(rev_vec,
|
|
|
|
for (auto it = rev_vec.begin(); it != rev_vec.end(); ++it)
|
|
|
|
[&] (pair<df::unit *, size_t> x)
|
|
|
|
dwarf_activity_column.add(getDwarfAverage(it->first, it->second), it->first);
|
|
|
|
{ dwarf_activity_column.add(getDwarfAverage(x.first, x.second), x.first); });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -778,9 +776,8 @@ public:
|
|
|
|
vector<pair<activity_type, size_t>> rev_vec(category_activities->begin(), category_activities->end());
|
|
|
|
vector<pair<activity_type, size_t>> rev_vec(category_activities->begin(), category_activities->end());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<activity_type, size_t>());
|
|
|
|
sort(rev_vec.begin(), rev_vec.end(), less_second<activity_type, size_t>());
|
|
|
|
|
|
|
|
|
|
|
|
for_each_(rev_vec,
|
|
|
|
for (auto it = rev_vec.begin(); it != rev_vec.end(); ++it)
|
|
|
|
[&] (pair<activity_type, size_t> x)
|
|
|
|
category_breakdown_column.add(getBreakdownAverage(it->first, it->second), it->first);
|
|
|
|
{ category_breakdown_column.add(getBreakdownAverage(x.first, x.second), x.first); });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
category_breakdown_column.fixWidth();
|
|
|
|
category_breakdown_column.fixWidth();
|
|
|
|