diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-22 08:35:01 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-22 08:35:01 +1000 |
commit | 8f9a43df028d13c1bc6654aa6dcf66dd542843d2 (patch) | |
tree | 677c3aae65caee744f4ce00478f40dcfec7147bc /win32/ScintillaWin.cxx | |
parent | afcd6f1fa748f2ade19010b3307c341b382818de (diff) | |
download | scintilla-mirror-8f9a43df028d13c1bc6654aa6dcf66dd542843d2.tar.gz |
Backport: Remove casts between char and unsigned char where possible.
Backport of changeset 6731:8e06234817c0.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index bd6e292f0..2393554a8 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2799,7 +2799,7 @@ void ScintillaWin::CopyToClipboard(const SelectionText &selectedText) { GlobalMemory ansiText; ansiText.Allocate(selectedText.LengthWithTerminator()); if (ansiText) { - memcpy(static_cast<char *>(ansiText.ptr), selectedText.Data(), selectedText.LengthWithTerminator()); + memcpy(ansiText.ptr, selectedText.Data(), selectedText.LengthWithTerminator()); ansiText.SetClip(CF_TEXT); } } @@ -3156,7 +3156,7 @@ STDMETHODIMP ScintillaWin::GetData(FORMATETC *pFEIn, STGMEDIUM *pSTM) { } else { text.Allocate(drag.LengthWithTerminator()); if (text) { - memcpy(static_cast<char *>(text.ptr), drag.Data(), drag.LengthWithTerminator()); + memcpy(text.ptr, drag.Data(), drag.LengthWithTerminator()); } } pSTM->hGlobal = text ? text.Unlock() : 0; @@ -3245,9 +3245,9 @@ BOOL ScintillaWin::CreateSystemCaret() { sysCaretHeight = vs.lineHeight; int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) * sysCaretHeight; - std::vector<char> bits(bitmapSize); + std::vector<BYTE> bits(bitmapSize); sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, - 1, reinterpret_cast<BYTE *>(&bits[0])); + 1, &bits[0]); BOOL retval = ::CreateCaret( MainHWND(), sysCaretBitmap, sysCaretWidth, sysCaretHeight); |