From 81082e48424f6a18d306dfb073ded8ef6688434e Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 25 Mar 2019 13:07:29 +1100 Subject: Backport: Convert #defines to enums and hide them in private section so not visible to other modules. Backport of changeset 7331:edd77716f615. --- src/RESearch.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/RESearch.h') diff --git a/src/RESearch.h b/src/RESearch.h index 285c9dc62..213055dac 100644 --- a/src/RESearch.h +++ b/src/RESearch.h @@ -11,14 +11,6 @@ namespace Scintilla { -/* - * The following defines are not meant to be changeable. - * They are for readability only. - */ -#define MAXCHR 256 -#define CHRBIT 8 -#define BITBLK MAXCHR/CHRBIT - class CharacterIndexer { public: virtual char CharAt(Sci::Position index) const=0; @@ -38,7 +30,6 @@ public: int Execute(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp); enum { MAXTAG=10 }; - enum { MAXNFA=4096 }; enum { NOTFOUND=-1 }; Sci::Position bopat[MAXTAG]; @@ -46,6 +37,14 @@ public: std::string pat[MAXTAG]; private: + + enum { MAXNFA = 4096 }; + // The following enums are not meant to be changeable. + // They are for readability only. + enum { MAXCHR = 256 }; + enum { CHRBIT = 8 }; + enum { BITBLK = MAXCHR / CHRBIT }; + void ChSet(unsigned char c); void ChSetWithCase(unsigned char c, bool caseSensitive); int GetBackslashExpression(const char *pattern, int &incr); -- cgit v1.2.3