aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-07-16 08:04:11 +1000
committerNeil <nyamatongwe@gmail.com>2020-07-16 08:04:11 +1000
commit500d0c61325b097df66f6a8f1981e71bf30ff139 (patch)
tree47ae4426c33bce753d7a89c6b7e1806dfab3cef9 /src/PositionCache.cxx
parent4fee1c0972ef24589e6d872b5cf4ad91f192d8d8 (diff)
downloadscintilla-mirror-500d0c61325b097df66f6a8f1981e71bf30ff139.tar.gz
Backport: Make EncodingFamily an enum class for more type safety.
Backport of changeset 8408:e89f22691610.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index 5b9c2ddd4..06e3586f2 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -505,10 +505,10 @@ TextSegment BreakFinder::Next() {
const int prev = nextBreak;
while (nextBreak < lineRange.end) {
int charWidth = 1;
- if (encodingFamily == efUnicode)
+ if (encodingFamily == EncodingFamily::unicode)
charWidth = UTF8DrawBytes(reinterpret_cast<unsigned char *>(&ll->chars[nextBreak]),
static_cast<int>(lineRange.end - nextBreak));
- else if (encodingFamily == efDBCS)
+ else if (encodingFamily == EncodingFamily::dbcs)
charWidth = pdoc->DBCSDrawBytes(
&ll->chars[nextBreak], static_cast<int>(lineRange.end - nextBreak));
const Representation *repr = preprs->RepresentationFromCharacter(&ll->chars[nextBreak], charWidth);