From 8ffc77be71507825a8f7585bcabff8ccc370206a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 8 Dec 2018 20:12:16 +0300 Subject: db_get_sa / db_get_wsa to receive the default value, massive code simplification --- plugins/FavContacts/src/favlist.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/FavContacts') 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("")); - } - else group = mir_wstrdup(TranslateT("Favorite Contacts")); + if (g_Options.bUseGroups) + group = db_get_wsa(hContact, "CList", "Group", TranslateT("")); + else + group = mir_wstrdup(TranslateT("Favorite Contacts")); status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE); } -- cgit v1.2.3