From 1f9c249665ccbd458237d439f11a7f14a85b34b2 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 19 Jul 2014 10:42:50 +1000 Subject: Using const for string argument to allow use with literals. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 3206c1912..2e966a4e5 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -88,7 +88,7 @@ Timer::Timer() : Idler::Idler() : state(false), idlerID(0) {} -static inline bool IsAllSpacesOrTabs(char *s, unsigned int len) { +static inline bool IsAllSpacesOrTabs(const char *s, unsigned int len) { for (unsigned int i = 0; i < len; i++) { // This is safe because IsSpaceOrTab() will return false for null terminators if (!IsSpaceOrTab(s[i])) @@ -1783,7 +1783,7 @@ static bool cmpSelPtrs(const SelectionRange *a, const SelectionRange *b) { } // AddCharUTF inserts an array of bytes which may or may not be in UTF-8. -void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { +void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { FilterSelections(); { UndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike); -- cgit v1.2.3