From a65132e982bca243cb8344ed5bfda956de6fc704 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 May 2018 00:12:49 +0300 Subject: Langpack_MarkPluginLoaded: more correct parameter type --- src/mir_app/src/miranda.h | 2 +- src/mir_core/src/langpack.cpp | 6 +++--- src/mir_core/src/miranda.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index bc7a8e7797..718474091c 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -198,6 +198,6 @@ MBaseProto* Proto_GetProto(const char *szProtoName); extern "C" { - MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo); + MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid); MIR_CORE_DLL(int) GetSubscribersCount(struct THook *hHook); }; diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 7de71d4739..ffe7fd40f7 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -586,9 +586,9 @@ MIR_CORE_DLL(MUUID*) Langpack_LookupUuid(WPARAM wParam) return (idx > 0 && idx <= lMuuids.getCount()) ? lMuuids[idx - 1] : nullptr; } -MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX *pInfo) +MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid) { - int idx = lMuuids.getIndex(&pInfo->uuid); + int idx = lMuuids.getIndex((MUUID*)&uuid); if (idx == -1) return 0; @@ -686,7 +686,7 @@ void GetDefaultLang() MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang) { if (_hLang && pInfo) - *(int*)_hLang = GetPluginLangId(pInfo->uuid, Langpack_MarkPluginLoaded((PLUGININFOEX*)pInfo)); + *(int*)_hLang = GetPluginLangId(pInfo->uuid, Langpack_MarkPluginLoaded(pInfo->uuid)); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h index f575399b0c..4757644250 100644 --- a/src/mir_core/src/miranda.h +++ b/src/mir_core/src/miranda.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern "C" { - MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo); + MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid); MIR_CORE_DLL(MUUID*) Langpack_LookupUuid(WPARAM wParam); }; -- cgit v1.2.3