summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-11-24 13:15:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-11-24 13:15:32 +0300
commit355c41643beadff74d490dc36f2c0432a2286e4c (patch)
tree9f5320227208ddc3e767e341af3c632a4a521c9a /src/mir_core
parent6d6cb956a78b2dbfa7e8d62f4234d8f27b100468 (diff)
more common database code moved to MDatabaseCommon
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/db.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp
index 15e9f2465d..7aa591db19 100644
--- a/src/mir_core/src/db.cpp
+++ b/src/mir_core/src/db.cpp
@@ -45,23 +45,9 @@ MIR_CORE_DLL(MIDatabase*) db_get_current()
return currDb;
}
-static int sttEnumVars(const char *szVarName, void *param)
-{
- LIST<char>* vars = (LIST<char>*)param;
- vars->insert(mir_strdup(szVarName));
- return 0;
-}
-
MIR_CORE_DLL(int) db_delete_module(MCONTACT hContact, const char *szModuleName)
{
- LIST<char> vars(20);
- db_enum_settings(hContact, sttEnumVars, szModuleName, &vars);
-
- for (int i = vars.getCount() - 1; i >= 0; i--) {
- db_unset(hContact, szModuleName, vars[i]);
- mir_free(vars[i]);
- }
- return 0;
+ return (currDb) ? currDb->DeleteModule(hContact, szModuleName) : 0;
}
/////////////////////////////////////////////////////////////////////////////////////////