diff options
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) { |