diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-19 10:40:48 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-19 10:40:48 +1100 |
commit | 25aca885085525118aec6fee7c1ff49442d90582 (patch) | |
tree | 8bcc546855b4f80a92bd9b7f9912c5b907310c26 /src/PositionCache.cxx | |
parent | 4c086ac7bebe13bcd2146f4e2cebc40510a7223c (diff) | |
download | scintilla-mirror-25aca885085525118aec6fee7c1ff49442d90582.tar.gz |
Switch enum to enum class.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 7801e4fbb..418a4fef9 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -161,7 +161,7 @@ int LineLayout::SubLineFromPosition(int posInLine, PointEnd pe) const noexcept { } for (int line = 0; line < lines; line++) { - if (pe & peSubLineEnd) { + if (FlagSet(pe, PointEnd::subLineEnd)) { // Return subline not start of next if (lineStarts[line + 1] <= posInLine + 1) return line; @@ -276,9 +276,9 @@ Point LineLayout::PointFromPosition(int posInLine, int lineHeight, PointEnd pe) pt.x = positions[posInLine] - positions[rangeSubLine.start]; if (rangeSubLine.start != 0) // Wrapped lines may be indented pt.x += wrapIndent; - if (pe & peSubLineEnd) // Return end of first subline not start of next + if (FlagSet(pe, PointEnd::subLineEnd)) // Return end of first subline not start of next break; - } else if ((pe & peLineEnd) && (subLine == (lines-1))) { + } else if (FlagSet(pe, PointEnd::lineEnd) && (subLine == (lines-1))) { pt.x = positions[numCharsInLine] - positions[rangeSubLine.start]; if (rangeSubLine.start != 0) // Wrapped lines may be indented pt.x += wrapIndent; |