diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-07 18:09:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-07 18:09:54 +0300 |
commit | 5508a77c6103f979697dd72d5a72347a354d020d (patch) | |
tree | f2f5aeed9794a8e9dd57f4caae65e2a20d429ee3 /plugins/Dbx_mdbx/src | |
parent | e26d06563851e85fa26c606a2577f81b4d7bef7c (diff) |
common code moved to the core
Diffstat (limited to 'plugins/Dbx_mdbx/src')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbsettings.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp index 6ca3049a72..429403a359 100644 --- a/plugins/Dbx_mdbx/src/dbsettings.cpp +++ b/plugins/Dbx_mdbx/src/dbsettings.cpp @@ -77,22 +77,7 @@ void CDbxMDBX::FillSettings() }
}
- for (DBCachedContact *cc = m_cache->GetFirstContact(); cc; cc = m_cache->GetNextContact(cc->contactID)) {
- CheckProto(cc, "");
-
- DBVARIANT dbv; dbv.type = DBVT_DWORD;
- cc->nSubs = (0 != GetContactSetting(cc->contactID, META_PROTO, "NumContacts", &dbv)) ? -1 : dbv.dVal;
- if (cc->nSubs != -1) {
- cc->pSubs = (MCONTACT*)mir_alloc(cc->nSubs * sizeof(MCONTACT));
- for (int k = 0; k < cc->nSubs; k++) {
- char setting[100];
- mir_snprintf(setting, _countof(setting), "Handle%d", k);
- cc->pSubs[k] = (0 != GetContactSetting(cc->contactID, META_PROTO, setting, &dbv)) ? 0 : dbv.dVal;
- }
- }
- cc->nDefault = (0 != GetContactSetting(cc->contactID, META_PROTO, "Default", &dbv)) ? -1 : dbv.dVal;
- cc->parentID = (0 != GetContactSetting(cc->contactID, META_PROTO, "ParentMeta", &dbv)) ? 0 : dbv.dVal;
- }
+ FillContactSettings();
}
/////////////////////////////////////////////////////////////////////////////////////////
|