From d9d71bd8d6872dcc7f7601f55e1bf8f14c61436f Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 16 Oct 2017 12:36:56 +1100 Subject: Use const for interface CharacterIndexer and its implementation DocumentIndexer. --- src/Document.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Document.cxx') 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(doc->Length())); + const DocumentIndexer di(doc, static_cast(doc->Length())); search.GrabMatches(di); for (int j = 0; j < *length; j++) { if (text[j] == '\\') { -- cgit v1.2.3