From f7cab317b777bb8fedb4bd8f4eeb7e68bf712989 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Apr 2018 08:35:01 +1000 Subject: Remove casts between char and unsigned char where possible. --- win32/ScintillaWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index b08b79d34..57299a053 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2810,7 +2810,7 @@ void ScintillaWin::CopyToClipboard(const SelectionText &selectedText) { GlobalMemory ansiText; ansiText.Allocate(selectedText.LengthWithTerminator()); if (ansiText) { - memcpy(static_cast(ansiText.ptr), selectedText.Data(), selectedText.LengthWithTerminator()); + memcpy(ansiText.ptr, selectedText.Data(), selectedText.LengthWithTerminator()); ansiText.SetClip(CF_TEXT); } } @@ -3167,7 +3167,7 @@ STDMETHODIMP ScintillaWin::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) { } else { text.Allocate(drag.LengthWithTerminator()); if (text) { - memcpy(static_cast(text.ptr), drag.Data(), drag.LengthWithTerminator()); + memcpy(text.ptr, drag.Data(), drag.LengthWithTerminator()); } } pSTM->hGlobal = text ? text.Unlock() : 0; @@ -3256,9 +3256,9 @@ BOOL ScintillaWin::CreateSystemCaret() { sysCaretHeight = vs.lineHeight; int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) * sysCaretHeight; - std::vector bits(bitmapSize); + std::vector bits(bitmapSize); sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, - 1, reinterpret_cast(&bits[0])); + 1, &bits[0]); BOOL retval = ::CreateCaret( MainHWND(), sysCaretBitmap, sysCaretWidth, sysCaretHeight); -- cgit v1.2.3