From e254312f9a660c83081ce2062ab14ba3c3614089 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Sep 2017 14:12:58 +0300 Subject: useless structure GCDEST finally removed --- protocols/IRCG/src/scripting.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'protocols/IRCG/src/scripting.cpp') diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index e4ef002172..d510422a84 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -59,9 +59,8 @@ static void __stdcall OnHook(void * pi) GCHOOK* gch = (GCHOOK*)pi; free(gch->ptszUID); free(gch->ptszText); - free((void*)gch->pDest->ptszID); - free((void*)gch->pDest->pszModule); - delete gch->pDest; + free((void*)gch->ptszID); + free((void*)gch->pszModule); delete gch; } @@ -78,28 +77,28 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertGuiOut(WPARAM, LPARAM lParam) if (m_scriptingEnabled && gch) { GCHOOK* gchook = new GCHOOK; - gchook->pDest = new GCDEST; - gchook->dwData = gch->dwData; - gchook->pDest->iType = gch->pDest->iType; + gchook->iType = gch->iType; if (gch->ptszText) gchook->ptszText = wcsdup(gch->ptszText); - else gchook->ptszText = NULL; + else + gchook->ptszText = NULL; if (gch->ptszUID) gchook->ptszUID = wcsdup(gch->ptszUID); else gchook->ptszUID = NULL; - if (gch->pDest->ptszID) { - CMStringW S = MakeWndID(gch->pDest->ptszID); - gchook->pDest->ptszID = wcsdup(S.c_str()); + if (gch->ptszID) { + CMStringW S = MakeWndID(gch->ptszID); + gchook->ptszID = wcsdup(S.c_str()); } - else gchook->pDest->ptszID = NULL; + else gchook->ptszID = NULL; - if (gch->pDest->pszModule) - gchook->pDest->pszModule = _strdup(gch->pDest->pszModule); - else gchook->pDest->pszModule = NULL; + if (gch->pszModule) + gchook->pszModule = _strdup(gch->pszModule); + else + gchook->pszModule = NULL; mir_forkthread(GuiOutThread, gchook); return 0; -- cgit v1.2.3