diff options
| author | nyamatongwe <unknown> | 2002-01-10 23:11:57 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2002-01-10 23:11:57 +0000 | 
| commit | 9fbdf629124454ddfc8ff9fc10ed4841d2ef8fba (patch) | |
| tree | ccf8d10998c2a32af1e3a8e66cf75d93669fc6a1 /win32 | |
| parent | d43d89fa81e0b04b762c2a9d58cb3d86d0400ec2 (diff) | |
| download | scintilla-mirror-9fbdf629124454ddfc8ff9fc10ed4841d2ef8fba.tar.gz | |
Made code bool-safe and turned Visual C++ warning 4800 back on.
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/PlatWin.cxx | 6 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 12 | 
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); | 
