diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-19 17:09:27 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-19 17:09:27 +1000 |
commit | 1edfa1eaef9301aeffe31253cfc06709d4d8aae0 (patch) | |
tree | 1f3d496d6b70578797b056e5bcbf5694cb65f407 /src/Editor.h | |
parent | d7c16df6b0cafa6d5dffbcfad31afe7d468b85be (diff) | |
download | scintilla-mirror-1edfa1eaef9301aeffe31253cfc06709d4d8aae0.tar.gz |
Backport: Casting changed in many places, due to change to 64-bit variables for 64-bit
builds. Some of the changes ensure no truncation while others remove casts
that are no longer needed because the externally visible Sci_Position is now
identical to Sci::Position. Some extra methods (CellBuffer::UCharAt and
Document::SciLineFromPosition) added to avoid casting in client code.
Sci::Line is currently identical to Sci::Position but it could be made smaller
so lines have Sci::Line types and are cast.
Some arguments widened.
Backport of changeset 6705:5c0a80740b8c.
Diffstat (limited to 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.h b/src/Editor.h index db070916d..3f6f8f2c8 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -394,9 +394,9 @@ protected: // ScintillaBase subclass needs access to much of Editor void AddChar(char ch); virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false); void ClearBeforeTentativeStart(); - void InsertPaste(const char *text, int len); + void InsertPaste(const char *text, Sci::Position len); enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 }; - void InsertPasteShape(const char *text, int len, PasteShape shape); + void InsertPasteShape(const char *text, Sci::Position len, PasteShape shape); void ClearSelection(bool retainMultipleSelections = false); void ClearAll(); void ClearDocumentStyle(); @@ -483,7 +483,7 @@ protected: // ScintillaBase subclass needs access to much of Editor std::string RangeText(Sci::Position start, Sci::Position end) const; void CopySelectionRange(SelectionText *ss, bool allowLineCopy=false); void CopyRangeToClipboard(Sci::Position start, Sci::Position end); - void CopyText(int length, const char *text); + void CopyText(size_t length, const char *text); void SetDragPosition(SelectionPosition newPos); virtual void DisplayCursor(Window::Cursor c); virtual bool DragThreshold(Point ptStart, Point ptNow); @@ -557,7 +557,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int CodePage() const; virtual bool ValidCodePage(int /* codePage */) const { return true; } - int WrapCount(int line); + Sci::Line WrapCount(Sci::Line line); void AddStyledText(char *buffer, Sci::Position appendLength); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; |