diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-10-28 08:32:09 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-10-28 08:32:09 +0000 |
commit | 40f21020382941498d53c837dde7e60fddcfdb72 (patch) | |
tree | 33fb2adbc45b485cc134f9fec5bb6b10d5011631 /plugins/SplashScreen | |
parent | 9e4456862c2975e726349acf4496ca5ca6b9aa77 (diff) |
SplashScreen: Optimize weird insides of ME_DB_CONTACT_SETTINGCHANGED function
git-svn-id: http://svn.miranda-ng.org/main/trunk@15634 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SplashScreen')
-rw-r--r-- | plugins/SplashScreen/src/main.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 608416ab05..b73c27c053 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -200,30 +200,27 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) TCHAR buf[128];
#endif
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- TCHAR *tszModule = mir_a2t(cws->szModule), *tszSetting = mir_a2t(cws->szSetting);
if (options.inheritGS) {
- if (!mir_tstrcmp(tszModule, _T("Skin")) & !mir_tstrcmp(tszSetting, _T("UseSound"))) {
+ if (!strcmp(cws->szModule, "Skin") && !strcmp(cws->szSetting, "UseSound")) {
db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal);
#ifdef _DEBUG
cws->value.bVal ? _DebugPopup(NULL, _T("Sounds enabled."), _T("")) : _DebugPopup(NULL, _T("Sounds disabled."), _T(""));
- logMessage(_T("Module"), tszModule);
- logMessage(_T("Setting"), tszSetting);
+ logMessage(_T("Module"), _A2T(cws->szModule));
+ logMessage(_T("Setting"), _A2T(cws->szSetting));
logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
#endif
}
- if (!mir_tstrcmp(tszModule, _T("PluginDisable")) & (!mir_tstrcmp(tszSetting, szDllName))) {
+ if (!strcmp(cws->szModule, "PluginDisable") && !strcmp(cws->szSetting, _T2A(szDllName))) {
db_set_b(NULL, MODNAME, "Active", cws->value.bVal);
#ifdef _DEBUG
cws->value.bVal ? _DebugPopup(NULL, _T("Disabled."), "") : _DebugPopup(NULL, _T("Enabled."), _T(""));
logMessage(_T("PlugDisableHook"), _T("Triggered"));
- logMessage(_T("Module"), tszModule);
- logMessage(_T("Setting"), tszSetting);
+ logMessage(_T("Module"), _A2T(cws->szModule));
+ logMessage(_T("Setting"), _A2T(cws->szSetting));
logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
#endif
}
}
- mir_free(tszModule);
- mir_free(tszSetting);
return 0;
}
|