From baa0c8ab5a4e5dc7a94a6bb0b8be095a760f48d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 24 Nov 2017 14:52:14 +0300 Subject: dbeditor: - code cleaning - version bump --- plugins/DbEditorPP/src/renamemodule.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/DbEditorPP/src/renamemodule.cpp') diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp index 3f87c49644..74e9e00a4a 100644 --- a/plugins/DbEditorPP/src/renamemodule.cpp +++ b/plugins/DbEditorPP/src/renamemodule.cpp @@ -1,19 +1,17 @@ #include "stdafx.h" - int renameModule(MCONTACT hContact, const char *oldName, const char *newName) { - DBVARIANT dbv; ModuleSettingLL settinglist; - if (IsModuleEmpty(hContact, oldName) || !EnumSettings(hContact, oldName, &settinglist)) - return 0; + return 0; int cnt = 0; - for(ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next) { + for (ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next) { + DBVARIANT dbv; if (!db_get_s(hContact, oldName, setting->name, &dbv, 0)) { - db_set(hContact, newName, setting->name, &dbv); + db_set(hContact, newName, setting->name, &dbv); db_unset(hContact, oldName, setting->name); db_free(&dbv); cnt++; @@ -23,7 +21,7 @@ int renameModule(MCONTACT hContact, const char *oldName, const char *newName) return cnt; } -INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: -- cgit v1.2.3