aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx6
-rw-r--r--win32/ScintillaWin.cxx12
2 files changed, 11 insertions, 7 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index c6adbf327..bfec57ea4 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -880,7 +880,7 @@ static LARGE_INTEGER frequency;
ElapsedTime::ElapsedTime() {
if (!initialisedET) {
- usePerformanceCounter = ::QueryPerformanceFrequency(&frequency);
+ usePerformanceCounter = ::QueryPerformanceFrequency(&frequency) != 0;
initialisedET = true;
}
if (usePerformanceCounter) {
@@ -946,7 +946,7 @@ void Platform::DebugDisplay(const char *s) {
}
bool Platform::IsKeyDown(int key) {
- return ::GetKeyState(key) & 0x80000000;
+ return (::GetKeyState(key) & 0x80000000) != 0;
}
long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) {
@@ -954,7 +954,7 @@ long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam,
}
bool Platform::IsDBCSLeadByte(int codePage, char ch) {
- return ::IsDBCSLeadByteEx(codePage, ch);
+ return ::IsDBCSLeadByteEx(codePage, ch) != 0;
}
// These are utility functions not really tied to a platform
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 1eae2e1e8..ae6018f94 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -577,7 +577,9 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
// Platform::IsKeyDown(VK_CONTROL),
// Platform::IsKeyDown(VK_MENU));
ButtonDown(Point::FromLong(lParam), ::GetTickCount(),
- wParam & MK_SHIFT, wParam & MK_CONTROL, Platform::IsKeyDown(VK_MENU));
+ (wParam & MK_SHIFT) != 0,
+ (wParam & MK_CONTROL) != 0,
+ Platform::IsKeyDown(VK_MENU));
::SetFocus(MainHWND());
break;
@@ -586,7 +588,9 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
break;
case WM_LBUTTONUP:
- ButtonUp(Point::FromLong(lParam), ::GetTickCount(), wParam & MK_CONTROL);
+ ButtonUp(Point::FromLong(lParam),
+ ::GetTickCount(),
+ (wParam & MK_CONTROL) != 0);
break;
case WM_SETCURSOR:
@@ -970,7 +974,7 @@ bool ScintillaWin::CanPaste() {
if (::IsClipboardFormatAvailable(CF_TEXT))
return true;
if (IsUnicodeMode())
- return ::IsClipboardFormatAvailable(CF_UNICODETEXT);
+ return ::IsClipboardFormatAvailable(CF_UNICODETEXT) != 0;
return false;
}
@@ -979,7 +983,7 @@ void ScintillaWin::Paste() {
int selStart = SelectionStart();
ClearSelection();
::OpenClipboard(MainHWND());
- bool isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect);
+ bool isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0;
HGLOBAL hmemUSelection = 0;
if (IsUnicodeMode()) {
hmemUSelection = ::GetClipboardData(CF_UNICODETEXT);