From 3439be14657d2a301bc211ae913299b71305f75e Mon Sep 17 00:00:00 2001 From: nathancorvussolis Date: Sun, 6 Nov 2016 22:03:13 +0900 Subject: [PATCH] Decrease complement count --- imcrvmgr/SearchUserDictionary.cpp | 2 +- imcrvtip/FunctionProvider.cpp | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/imcrvmgr/SearchUserDictionary.cpp b/imcrvmgr/SearchUserDictionary.cpp index f6e3c780..404691d0 100644 --- a/imcrvmgr/SearchUserDictionary.cpp +++ b/imcrvmgr/SearchUserDictionary.cpp @@ -2,7 +2,7 @@ #include "configxml.h" #include "imcrvmgr.h" -#define MAX_COMPLEMENT_RESULT 1024 +#define MAX_COMPLEMENT_RESULT 256 //ユーザー辞書 SKKDIC userdic; diff --git a/imcrvtip/FunctionProvider.cpp b/imcrvtip/FunctionProvider.cpp index c37d550c..437408b1 100644 --- a/imcrvtip/FunctionProvider.cpp +++ b/imcrvtip/FunctionProvider.cpp @@ -64,10 +64,6 @@ HRESULT CTextService::GetFunction(REFGUID rguid, REFIID riid, IUnknown **ppunk) { *ppunk = (ITfFnGetPreferredTouchKeyboardLayout *)this; } - else - { - return E_INVALIDARG; - } if(*ppunk) { @@ -103,36 +99,33 @@ HRESULT CTextService::GetDisplayName(BSTR *pbstrName) HRESULT CTextService::Show(HWND hwndParent, LANGID langid, REFGUID rguidProfile) { - if(IsEqualGUID(rguidProfile, c_guidProfile)) - { - _StartConfigure(); - } - else + if(!IsEqualGUID(rguidProfile, c_guidProfile)) { return E_INVALIDARG; } + _StartConfigure(); + return S_OK; } HRESULT CTextService::Show(HWND hwndParent) { _StartConfigure(); + return S_OK; } HRESULT CTextService::GetLayout(TKBLayoutType *pTKBLayoutType, WORD *pwPreferredLayoutId) { - if(pTKBLayoutType != nullptr && pwPreferredLayoutId != nullptr) - { - *pTKBLayoutType = TKBLT_OPTIMIZED; - *pwPreferredLayoutId = TKBL_OPT_JAPANESE_ABC; - } - else + if(pTKBLayoutType == nullptr || pwPreferredLayoutId == nullptr) { return E_INVALIDARG; } + *pTKBLayoutType = TKBLT_OPTIMIZED; + *pwPreferredLayoutId = TKBL_OPT_JAPANESE_ABC; + return S_OK; }