diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-10-16 12:36:56 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-10-16 12:36:56 +1100 | 
| commit | d9d71bd8d6872dcc7f7601f55e1bf8f14c61436f (patch) | |
| tree | 55c3aefda19093eb5738fe687b607469cecbc2f1 /src/Document.cxx | |
| parent | 4b87bf80cada418a5cf193447c31f4d736bde492 (diff) | |
| download | scintilla-mirror-d9d71bd8d6872dcc7f7601f55e1bf8f14c61436f.tar.gz | |
Use const for interface CharacterIndexer and its implementation DocumentIndexer.
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 7da62ff8f..08efa9ec2 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2590,7 +2590,7 @@ public:  	~DocumentIndexer() override {  	} -	char CharAt(Sci::Position index) override { +	char CharAt(Sci::Position index) const override {  		if (index < 0 || index >= end)  			return 0;  		else @@ -3008,7 +3008,7 @@ long BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::Position m  			}  		} -		DocumentIndexer di(doc, endOfLine); +		const DocumentIndexer di(doc, endOfLine);  		int success = search.Execute(di, startOfLine, endOfLine);  		if (success) {  			pos = search.bopat[0]; @@ -3040,7 +3040,7 @@ long BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::Position m  const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) {  	substituted.clear(); -	DocumentIndexer di(doc, static_cast<Sci::Position>(doc->Length())); +	const DocumentIndexer di(doc, static_cast<Sci::Position>(doc->Length()));  	search.GrabMatches(di);  	for (int j = 0; j < *length; j++) {  		if (text[j] == '\\') {  | 
