13
0

Sort route-templates by name

This commit is contained in:
Robin Gareus 2019-02-22 22:33:01 +01:00
parent 59c856c2c0
commit 11ef82954e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -134,6 +134,12 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml)
std::sort(template_names.begin(), template_names.end()); std::sort(template_names.begin(), template_names.end());
} }
struct TemplateInfoSorter {
bool operator () (TemplateInfo const& a, TemplateInfo const& b) {
return a.name < b.name;
}
};
void void
find_route_templates (vector<TemplateInfo>& template_names) find_route_templates (vector<TemplateInfo>& template_names)
{ {
@ -182,6 +188,8 @@ find_route_templates (vector<TemplateInfo>& template_names)
template_names.push_back (rti); template_names.push_back (rti);
} }
std::sort (template_names.begin(), template_names.end (), TemplateInfoSorter ());
} }
} }