From e702dacda85f0976d1006d9634dc38b53fad1336 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 2 Nov 2023 08:51:15 +1100 Subject: Feature [feature-requests:#1500] Remove match text retrieval from MatchOnLines as it is redone in SubstituteByPosition. Replace RESearch::pat and RESearch::GrabMatches with retrieving matches as needed in SubstituteByPosition. --- src/RESearch.cxx | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/RESearch.cxx') diff --git a/src/RESearch.cxx b/src/RESearch.cxx index 98399c925..8fe3724c8 100644 --- a/src/RESearch.cxx +++ b/src/RESearch.cxx @@ -264,20 +264,6 @@ RESearch::RESearch(CharClassify *charClassTable) { void RESearch::Clear() { bopat.fill(NOTFOUND); eopat.fill(NOTFOUND); - for (int i = 0; i < MAXTAG; i++) { - pat[i].clear(); - } -} - -void RESearch::GrabMatches(const CharacterIndexer &ci) { - for (unsigned int i = 0; i < MAXTAG; i++) { - if ((bopat[i] != NOTFOUND) && (eopat[i] != NOTFOUND)) { - const Sci::Position len = eopat[i] - bopat[i]; - pat[i].resize(len); - for (Sci::Position j = 0; j < len; j++) - pat[i][j] = ci.CharAt(bopat[i] + j); - } - } } void RESearch::ChSet(unsigned char c) noexcept { -- cgit v1.2.3