From 25aca885085525118aec6fee7c1ff49442d90582 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 19 Mar 2021 10:40:48 +1100 Subject: Switch enum to enum class. --- src/EditView.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/EditView.h') diff --git a/src/EditView.h b/src/EditView.h index eb4cbf849..11fe5c659 100644 --- a/src/EditView.h +++ b/src/EditView.h @@ -20,17 +20,18 @@ struct PrintParameters { /** * The view may be drawn in separate phases. */ -enum DrawPhase { - drawBack = 0x1, - drawIndicatorsBack = 0x2, - drawText = 0x4, - drawIndentationGuides = 0x8, - drawIndicatorsFore = 0x10, - drawSelectionTranslucent = 0x20, - drawLineTranslucent = 0x40, - drawFoldLines = 0x80, - drawCarets = 0x100, - drawAll = 0x1FF +enum class DrawPhase { + none = 0x0, + back = 0x1, + indicatorsBack = 0x2, + text = 0x4, + indentationGuides = 0x8, + indicatorsFore = 0x10, + selectionTranslucent = 0x20, + lineTranslucent = 0x40, + foldLines = 0x80, + carets = 0x100, + all = 0x1FF }; bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) noexcept; @@ -64,7 +65,7 @@ public: * In multiPhaseDraw mode, drawing is performed in multiple phases with each phase drawing * one feature over the whole drawing area, instead of within one line. This allows text to * overlap from one line to the next. */ - enum PhasesDraw { phasesOne, phasesTwo, phasesMultiple }; + enum class PhasesDraw { one, two, multiple }; PhasesDraw phasesDraw; int lineWidthMaxSeen; -- cgit v1.2.3