Skip to content

Commit 95351bf

Browse files
committed
Fix some compiler warnings.
1 parent d134631 commit 95351bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TextService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ STDMETHODIMP TextService::Activate(ITfThreadMgr *pThreadMgr, TfClientId tfClient
671671
compartmentSource->AdviseSink(IID_ITfCompartmentEventSink, (ITfCompartmentEventSink*)this, &it->cookie);
672672
}
673673
}
674-
isKeyboardOpened_ = threadCompartmentValue(GUID_COMPARTMENT_KEYBOARD_OPENCLOSE);
674+
isKeyboardOpened_ = threadCompartmentValue(GUID_COMPARTMENT_KEYBOARD_OPENCLOSE) != 0;
675675

676676
// FIXME: under Windows 7, it seems that the keyboard is closed every time
677677
// our text service is activated. The value in the compartment is always empty. :-(

TextService.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ class TextService:
279279
DWORD cookie;
280280
bool isGlobal;
281281

282-
bool operator == (const GUID& other) {
283-
return ::IsEqualGUID(guid, other);
282+
bool operator == (const GUID& other) const {
283+
return bool(::IsEqualGUID(guid, other));
284284
}
285285
};
286286

0 commit comments

Comments
 (0)