diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index 4fa15ede32..4e95e71f49 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -103,7 +103,7 @@ struct ALL_PROJECTS_LIST { ~ALL_PROJECTS_LIST(); void clear(); - void shuffle(); + void alpha_sort(); }; struct RSC_DESC { diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index fbd05fefbe..74a6a880d3 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -211,8 +211,9 @@ ALL_PROJECTS_LIST::~ALL_PROJECTS_LIST() { clear(); } -bool compare_project_list_entry(const PROJECT_LIST_ENTRY* a, const PROJECT_LIST_ENTRY* b) -{ +bool compare_project_list_entry( + const PROJECT_LIST_ENTRY* a, const PROJECT_LIST_ENTRY* b +) { #ifdef _WIN32 return _stricmp(a->name.c_str(), b->name.c_str()) < 0; #else @@ -220,8 +221,7 @@ bool compare_project_list_entry(const PROJECT_LIST_ENTRY* a, const PROJECT_LIST_ #endif } -bool compare_am_list_entry(const AM_LIST_ENTRY* a, const AM_LIST_ENTRY* b) -{ +bool compare_am_list_entry(const AM_LIST_ENTRY* a, const AM_LIST_ENTRY* b) { #ifdef _WIN32 return _stricmp(a->name.c_str(), b->name.c_str()) < 0; #else @@ -229,7 +229,7 @@ bool compare_am_list_entry(const AM_LIST_ENTRY* a, const AM_LIST_ENTRY* b) #endif } -void ALL_PROJECTS_LIST::shuffle() { +void ALL_PROJECTS_LIST::alpha_sort() { sort(projects.begin(), projects.end(), compare_project_list_entry); sort(account_managers.begin(), account_managers.end(), compare_am_list_entry); } @@ -1602,7 +1602,7 @@ int RPC_CLIENT::get_all_projects_list(ALL_PROJECTS_LIST& pl) { } } - pl.shuffle(); + pl.alpha_sort(); return 0; }