mirror of https://github.com/BOINC/boinc.git
- lib: function name tweak
This commit is contained in:
parent
79c6225fc2
commit
10f8baca5b
|
@ -103,7 +103,7 @@ struct ALL_PROJECTS_LIST {
|
|||
~ALL_PROJECTS_LIST();
|
||||
|
||||
void clear();
|
||||
void shuffle();
|
||||
void alpha_sort();
|
||||
};
|
||||
|
||||
struct RSC_DESC {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue