From 9374c8e701dcb61a46c89a854235d91a23bf672e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jul 2019 20:02:16 +0300 Subject: warning fixes --- src/mir_app/src/clcutils.cpp | 2 +- src/mir_app/src/colorchooser.cpp | 11 ++++------- src/mir_app/src/proto_utils.cpp | 2 -- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 2ba762e39a..cd26b13f54 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -422,7 +422,7 @@ MIR_APP_DLL(void) Clist_EndRename(ClcData *dat, int save) ClcContact *contact; if (g_clistApi.pfnGetRowByIndex(dat, dat->selection, &contact, nullptr) != -1) { - if (mir_wstrcmp(contact->szText, text) && !wcsstr(text, L"\\")) { + if (mir_wstrcmp(contact->szText, text) && !wcschr(text, '\\')) { if (contact->type == CLCIT_GROUP) { if (contact->group->parent && contact->group->parent->parent) { wchar_t szFullName[256]; diff --git a/src/mir_app/src/colorchooser.cpp b/src/mir_app/src/colorchooser.cpp index 6ed91bddda..0909e2cbad 100644 --- a/src/mir_app/src/colorchooser.cpp +++ b/src/mir_app/src/colorchooser.cpp @@ -49,7 +49,7 @@ class CColorChooserDlg : public CDlgBase int m_xPosition, m_yPosition; int iCurrentHotTrack, iRows, iColumns; - HWND m_hwndTarget, m_hwndChooser, hwndPreviousActiveWindow; + HWND m_hwndTarget, m_hwndChooser; BOOL m_bForeground, bChoosing; int CalculateCoordinatesToButton(POINT pt) @@ -103,15 +103,14 @@ public: m_hwndParent = hwndDlg; m_xPosition = rc.left + 3; m_yPosition = IsWindowVisible(hwndChooser) ? rc.top - 1 : rc.top + 20; - } - bool OnInitDialog() override - { int iSquareRoot = (int)sqrt(static_cast(16)); - iColumns = iSquareRoot * iSquareRoot == 16 ? iSquareRoot : iSquareRoot + 1; iRows = iSquareRoot; + } + bool OnInitDialog() override + { RECT rc; rc.top = rc.left = 100; rc.right = 100 + iColumns * 25 + 1; @@ -180,8 +179,6 @@ public: case WM_ACTIVATE: if (wParam == WA_INACTIVE) Close(); - else if ((wParam == WA_ACTIVE) || (wParam == WA_CLICKACTIVE)) - hwndPreviousActiveWindow = (HWND)lParam; break; case WM_MOUSEMOVE: diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 06b775cf7a..16071e63b4 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -164,8 +164,6 @@ PROTO_INTERFACE::PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszU m_hmiReqAuth = hReqAuth; m_hmiGrantAuth = hGrantAuth; m_hmiRevokeAuth = hRevokeAuth; - - m_hWindowList = nullptr; } PROTO_INTERFACE::~PROTO_INTERFACE() -- cgit v1.2.3