static void write_battle_result_map(config_writer &out, const stats::battle_result_map& m) { for(stats::battle_result_map::const_iterator i = m.begin(); i != m.end(); ++i) { out.open_child("sequence"); write_str_int_map(out, i->second); out.write_key_val("_num", i->first); out.close_child("sequence"); } }
static config write_battle_result_map(const stats::battle_result_map& m) { config res; for(stats::battle_result_map::const_iterator i = m.begin(); i != m.end(); ++i) { config& new_cfg = res.add_child("sequence"); new_cfg = write_str_int_map(i->second); new_cfg["_num"] = i->first; } return res; }
static config write_battle_result_map(const stats::battle_result_map& m) { config res; for(stats::battle_result_map::const_iterator i = m.begin(); i != m.end(); ++i) { config& new_cfg = res.add_child("sequence"); new_cfg = write_str_int_map(i->second); char buf[50]; snprintf(buf,sizeof(buf),"%d",i->first); new_cfg["_num"] = buf; } return res; }
static void merge_battle_result_maps(stats::battle_result_map& a, const stats::battle_result_map& b) { for(stats::battle_result_map::const_iterator i = b.begin(); i != b.end(); ++i) { merge_str_int_map(a[i->first],i->second); } }