diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-07-19 10:42:50 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-07-19 10:42:50 +1000 | 
| commit | c995ec683d9fd296097740d3c60e833621f24f5b (patch) | |
| tree | f30a62970c933a738fb398c08b44ab70ade3fce2 /src | |
| parent | ca7b9e66fc519cae98fd0e8eac04f5e81ef6584c (diff) | |
| download | scintilla-mirror-c995ec683d9fd296097740d3c60e833621f24f5b.tar.gz | |
Using const for string argument to allow use with literals.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 4 | ||||
| -rw-r--r-- | src/Editor.h | 2 | ||||
| -rw-r--r-- | src/ScintillaBase.cxx | 2 | ||||
| -rw-r--r-- | src/ScintillaBase.h | 2 | 
4 files changed, 5 insertions, 5 deletions
| 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); diff --git a/src/Editor.h b/src/Editor.h index be89bfd3a..f36cb9b99 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -386,7 +386,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	void FilterSelections();  	int InsertSpace(int position, unsigned int spaces);  	void AddChar(char ch); -	virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); +	virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false);  	void InsertPaste(const char *text, int len);  	enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 };  	void InsertPasteShape(const char *text, int len, PasteShape shape); diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 48ec46808..ee7818ef2 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -76,7 +76,7 @@ void ScintillaBase::Finalise() {  	popup.Destroy();  } -void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { +void ScintillaBase::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) {  	bool isFillUp = ac.Active() && ac.IsFillUpChar(*s);  	if (!isFillUp) {  		Editor::AddCharUTF(s, len, treatAsDBCS); diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h index 8440ebecc..ee717cbda 100644 --- a/src/ScintillaBase.h +++ b/src/ScintillaBase.h @@ -60,7 +60,7 @@ protected:  	virtual void Initialise() = 0;  	virtual void Finalise(); -	virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); +	virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false);  	void Command(int cmdId);  	virtual void CancelModes();  	virtual int KeyCommand(unsigned int iMessage); | 
