From bd276bf08cc7ae0c2c9be6b0c202047fede7c704 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Dec 2014 09:19:14 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@11665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msglog.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/TabSRMM/src/msglog.cpp') diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index c9cd26d520..51ee2d523a 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -1205,7 +1205,6 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp { TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); CHARRANGE oldSel, sel; - POINT pt = { 0 }; // calc time limit for grouping HWND hwndrtf = dat->hwndIEView ? dat->hwndIWebBrowserControl : GetDlgItem(hwndDlg, IDC_LOG); @@ -1335,8 +1334,6 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp gtxl.codepage = 1200; gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS; - PARAFORMAT2 pf2; - memset(&pf2, 0, sizeof(PARAFORMAT2)); sel.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)>xl, 0); sel.cpMin = sel.cpMax - 1; SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel); @@ -1369,12 +1366,12 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp // NLS functions (for unicode version only) encoding stuff.. static BOOL CALLBACK LangAddCallback(LPTSTR str) { - int i, count; UINT cp = _ttoi(str); - count = SIZEOF(cpTable); - for (i = 0; i < count && cpTable[i].cpId != cp; i++); - if (i < count) - AppendMenu(PluginConfig.g_hMenuEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName)); + for (int i = 0; i < SIZEOF(cpTable); i++) + if (cpTable[i].cpId == cp) { + AppendMenu(PluginConfig.g_hMenuEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName)); + break; + } return TRUE; } -- cgit v1.2.3