diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-07-16 19:46:17 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-07-16 19:46:17 +1000 |
| commit | 2398ed78570108333d054d03d4af38b6c5ff19d7 (patch) | |
| tree | 58667877d0dce91c560859c027b20897982ee22c /lexlib/LexAccessor.h | |
| parent | 8c86b7a6de1048d4c86e07c44da27b0dba4d7572 (diff) | |
| download | scintilla-mirror-2398ed78570108333d054d03d4af38b6c5ff19d7.tar.gz | |
Make EncodingType an enum class.
Diffstat (limited to 'lexlib/LexAccessor.h')
| -rw-r--r-- | lexlib/LexAccessor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h index 3564dd0bc..e11535bf7 100644 --- a/lexlib/LexAccessor.h +++ b/lexlib/LexAccessor.h @@ -10,7 +10,7 @@ namespace Scintilla { -enum EncodingType { enc8bit, encUnicode, encDBCS }; +enum class EncodingType { eightBit, unicode, dbcs }; class LexAccessor { private: @@ -51,7 +51,7 @@ public: explicit LexAccessor(IDocument *pAccess_) : pAccess(pAccess_), startPos(extremePosition), endPos(0), codePage(pAccess->CodePage()), - encodingType(enc8bit), + encodingType(EncodingType::eightBit), lenDoc(pAccess->Length()), validLen(0), startSeg(0), startPosStyling(0), @@ -61,14 +61,14 @@ public: styleBuf[0] = 0; switch (codePage) { case 65001: - encodingType = encUnicode; + encodingType = EncodingType::unicode; break; case 932: case 936: case 949: case 950: case 1361: - encodingType = encDBCS; + encodingType = EncodingType::dbcs; } } char operator[](Sci_Position position) { @@ -94,7 +94,7 @@ public: bool IsLeadByte(char ch) const { return pAccess->IsDBCSLeadByte(ch); } - EncodingType Encoding() const { + EncodingType Encoding() const noexcept { return encodingType; } bool Match(Sci_Position pos, const char *s) { |
