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 | f7cab317b777bb8fedb4bd8f4eeb7e68bf712989 (patch) | |
| tree | a80432017efd0e8b427bb7b2e3cd6eedf48de57d /win32 | |
| parent | dc7c28cfcf21c18f96a49f2cc0818d4f676bd301 (diff) | |
| download | scintilla-mirror-f7cab317b777bb8fedb4bd8f4eeb7e68bf712989.tar.gz | |
Remove casts between char and unsigned char where possible.
Diffstat (limited to 'win32')
| -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 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<char *>(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<char *>(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<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); |
