diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:26 +0300 |
commit | 8ffc77be71507825a8f7585bcabff8ccc370206a (patch) | |
tree | aa13a8070f31286db6ad22e17a577e547942f951 /plugins/FavContacts | |
parent | 41b2fdfc654e3eec07c97ceba00cda13d988ffff (diff) |
db_get_sa / db_get_wsa to receive the default value, massive code simplification
Diffstat (limited to 'plugins/FavContacts')
-rw-r--r-- | plugins/FavContacts/src/favlist.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h index c0bfb91a8d..3bf8899ffc 100644 --- a/plugins/FavContacts/src/favlist.h +++ b/plugins/FavContacts/src/favlist.h @@ -19,11 +19,10 @@ public: {
name = mir_wstrdup(Clist_GetContactDisplayName(hContact));
- if (g_Options.bUseGroups) {
- if ((group = db_get_wsa(hContact, "CList", "Group")) == nullptr)
- group = mir_wstrdup(TranslateT("<no group>"));
- }
- else group = mir_wstrdup(TranslateT("Favorite Contacts"));
+ if (g_Options.bUseGroups)
+ group = db_get_wsa(hContact, "CList", "Group", TranslateT("<no group>"));
+ else
+ group = mir_wstrdup(TranslateT("Favorite Contacts"));
status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
}
|