aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/RESearch.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2023-10-15 08:40:37 +1100
committerNeil <nyamatongwe@gmail.com>2023-10-15 08:40:37 +1100
commit0a00f1b52c9f05800192db71ccc28dfaed58729b (patch)
tree1ef515f84fa935f8c3c14c98824522b0aba32112 /src/RESearch.h
parent810883d3e039c92ce33372cc2e762615325b37f9 (diff)
downloadscintilla-mirror-0a00f1b52c9f05800192db71ccc28dfaed58729b.tar.gz
Use std::array for regex match positions as it will simplify copying.
This change set does not change behaviour.
Diffstat (limited to 'src/RESearch.h')
-rw-r--r--src/RESearch.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/RESearch.h b/src/RESearch.h
index 34c6c46f9..c142441ae 100644
--- a/src/RESearch.h
+++ b/src/RESearch.h
@@ -21,7 +21,7 @@ class RESearch {
public:
explicit RESearch(CharClassify *charClassTable);
// No dynamic allocation so default copy constructor and assignment operator are OK.
- void Clear() noexcept;
+ void Clear();
void GrabMatches(const CharacterIndexer &ci);
const char *Compile(const char *pattern, Sci::Position length, bool caseSensitive, bool posix) noexcept;
int Execute(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp);
@@ -29,8 +29,9 @@ public:
static constexpr int MAXTAG = 10;
static constexpr int NOTFOUND = -1;
- Sci::Position bopat[MAXTAG];
- Sci::Position eopat[MAXTAG];
+ using MatchPositions = std::array<Sci::Position, MAXTAG>;
+ MatchPositions bopat;
+ MatchPositions eopat;
std::string pat[MAXTAG];
private: