0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/console: Sort the mod list.

This commit is contained in:
Jason Volk 2018-02-19 14:49:42 -08:00
parent 0126fd9701
commit d869c479c6

View file

@ -133,7 +133,13 @@ console_cmd__mod_path(const string_view &line)
bool bool
console_cmd__mod_list(const string_view &line) console_cmd__mod_list(const string_view &line)
{ {
for(const auto &mod : mods::available()) auto avflist(mods::available());
const auto b(std::make_move_iterator(begin(avflist)));
const auto e(std::make_move_iterator(end(avflist)));
std::vector<std::string> available(b, e);
std::sort(begin(available), end(available));
for(const auto &mod : available)
{ {
const auto loadstr const auto loadstr
{ {