diff options
author | Robin Gareus <robin@gareus.org> | 2019-02-22 22:33:01 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-02-22 22:33:01 +0100 |
commit | 11ef82954efa74dd281f950bd6f7a677296419ad (patch) | |
tree | b87dc51b3e404a865445ce232a9ef17a424db8a5 /libs/ardour/template_utils.cc | |
parent | 59c856c2c0b11e459413c4e4455897110dd41a4f (diff) |
Sort route-templates by name
Diffstat (limited to 'libs/ardour/template_utils.cc')
-rw-r--r-- | libs/ardour/template_utils.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 4b8d5b2b78..d92dc32f52 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -134,6 +134,12 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml) std::sort(template_names.begin(), template_names.end()); } +struct TemplateInfoSorter { + bool operator () (TemplateInfo const& a, TemplateInfo const& b) { + return a.name < b.name; + } +}; + void find_route_templates (vector<TemplateInfo>& template_names) { @@ -182,6 +188,8 @@ find_route_templates (vector<TemplateInfo>& template_names) template_names.push_back (rti); } + + std::sort (template_names.begin(), template_names.end (), TemplateInfoSorter ()); } } |