diff options
Diffstat (limited to 'lexlib')
| -rw-r--r-- | lexlib/LexAccessor.h | 10 | ||||
| -rw-r--r-- | lexlib/StyleContext.h | 2 | 
2 files changed, 6 insertions, 6 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) { diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 96ef49d13..6c617a098 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -72,7 +72,7 @@ public:  		width(0),  		chNext(0),  		widthNext(1) { -		if (styler.Encoding() != enc8bit) { +		if (styler.Encoding() != EncodingType::eightBit) {  			multiByteAccess = styler.MultiByteAccess();  		}  		styler.StartAt(startPos /*, chMask*/); | 
