From f965f5ecb21353b1a6be784c20cd36ffffc416c0 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 24 Apr 2018 16:41:42 +1000 Subject: Feature [feature-requests:#1215]. Make a parameter const. --- src/Editor.cxx | 2 +- src/Editor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 730c47d00..848241941 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5573,7 +5573,7 @@ Sci::Line Editor::WrapCount(Sci::Line line) { } } -void Editor::AddStyledText(char *buffer, Sci::Position appendLength) { +void Editor::AddStyledText(const char *buffer, Sci::Position appendLength) { // The buffer consists of alternating character bytes and style bytes const Sci::Position textLength = appendLength / 2; std::string text(textLength, '\0'); diff --git a/src/Editor.h b/src/Editor.h index defb5aea7..e9dbb27b4 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -558,7 +558,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int CodePage() const; virtual bool ValidCodePage(int /* codePage */) const { return true; } Sci::Line WrapCount(Sci::Line line); - void AddStyledText(char *buffer, Sci::Position appendLength); + void AddStyledText(const char *buffer, Sci::Position appendLength); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; bool ValidMargin(uptr_t wParam) const; -- cgit v1.2.3