https://git.reactos.org/?p=reactos.git;a=commitdiff;h=020d7d582f1b130472f99…
commit 020d7d582f1b130472f999314a1d65862813eddd
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Sep 8 09:57:17 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Sep 8 09:57:17 2022 +0900
[IMM32] Remove unnecessary NULL checks for function pointers
CORE-11700
---
dll/win32/imm32/ctf.c | 6 ++----
dll/win32/imm32/ime.c | 7 ++-----
dll/win32/imm32/imm.c | 8 ++++----
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c
index 7f5268bffe9..61a36b305ff 100644
--- a/dll/win32/imm32/ctf.c
+++ b/dll/win32/imm32/ctf.c
@@ -129,8 +129,7 @@ BOOL WINAPI CtfImmIsGuidMapEnable(HIMC hIMC)
if (!pImeDpi)
return ret;
- if (pImeDpi->CtfImeIsGuidMapEnable)
- ret = pImeDpi->CtfImeIsGuidMapEnable(hIMC);
+ ret = pImeDpi->CtfImeIsGuidMapEnable(hIMC);
ImmUnlockImeDpi(pImeDpi);
return ret;
@@ -162,8 +161,7 @@ HRESULT WINAPI CtfImmGetGuidAtom(HIMC hIMC, DWORD dwUnknown, LPDWORD
pdwGuidAtom
if (!pImeDpi)
return hr;
- if (pImeDpi->CtfImeGetGuidAtom)
- hr = pImeDpi->CtfImeGetGuidAtom(hIMC, dwUnknown, pdwGuidAtom);
+ hr = pImeDpi->CtfImeGetGuidAtom(hIMC, dwUnknown, pdwGuidAtom);
ImmUnlockImeDpi(pImeDpi);
return hr;
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index 30cd10b7658..5d6eb7bb374 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -59,7 +59,7 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
if (!pImeDpi->ImeInquire(pImeInfo, szUIClass, dwSysInfoFlags))
return FALSE;
}
- else if (IS_CICERO_MODE() && pImeDpi->CtfImeInquireExW)
+ else if (IS_CICERO_MODE())
{
if (!pImeDpi->CtfImeInquireExW(pImeInfo, szUIClass, dwSysInfoFlags,
pImeDpi->hKL))
return FALSE;
@@ -311,7 +311,7 @@ ImeDpi_Escape(PIMEDPI pImeDpi, HIMC hIMC, UINT uSubFunc, LPVOID
lpData, HKL hKL)
if (IS_IME_HKL(hKL))
return pImeDpi->ImeEscape(hIMC, uSubFunc, lpData);
- if (IS_CICERO_MODE() && pImeDpi->CtfImeEscapeEx)
+ if (IS_CICERO_MODE())
return pImeDpi->CtfImeEscapeEx(hIMC, uSubFunc, lpData, hKL);
return 0;
@@ -604,9 +604,6 @@ ImmGetImeMenuItemsAW(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID
lpImeParentM
return 0;
}
- if (pImeDpi->ImeGetImeMenuItems == NULL)
- goto Quit;
-
bImcIsAnsi = Imm32IsImcAnsi(hIMC);
if (bImcIsAnsi != bTargetIsAnsi)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index 9cc21e111c3..2a87fc945ee 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -220,7 +220,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hOldKL))
pOldImeDpi->ImeSelect(hIMC, FALSE);
- else if (IS_CICERO_MODE() && !IS_16BIT_MODE() &&
pOldImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !IS_16BIT_MODE())
pOldImeDpi->CtfImeSelectEx(hIMC, FALSE, hOldKL);
}
pClientImc->hKL = NULL;
@@ -242,7 +242,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hNewKL))
pNewImeDpi->ImeSelect(hIMC, TRUE);
- else if (IS_CICERO_MODE() && !IS_16BIT_MODE() &&
pNewImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !IS_16BIT_MODE())
pNewImeDpi->CtfImeSelectEx(hIMC, TRUE, hNewKL);
pClientImc->hKL = hNewKL;
@@ -389,7 +389,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hNewKL))
pNewImeDpi->ImeSelect(hIMC, TRUE);
- else if (IS_CICERO_MODE() && !IS_16BIT_MODE() &&
pNewImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !IS_16BIT_MODE())
pNewImeDpi->CtfImeSelectEx(hIMC, TRUE, hNewKL);
pClientImc->hKL = hNewKL;
@@ -781,7 +781,7 @@ Imm32CreateInputContext(HIMC hIMC, LPINPUTCONTEXT pIC, PCLIENTIMC
pClientImc, HK
{
if (IS_IME_HKL(hKL))
pImeDpi->ImeSelect(hIMC, TRUE);
- else if (IS_CICERO_MODE() && !IS_16BIT_MODE() &&
pImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !IS_16BIT_MODE())
pImeDpi->CtfImeSelectEx(hIMC, TRUE, hKL);
}