diff options
author | Neil <nyamatongwe@gmail.com> | 2020-06-10 10:51:46 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-06-10 10:51:46 +1000 |
commit | 6516d81f0ad2574e49732c0def87d19c5a23ddeb (patch) | |
tree | 1d23559c9e0d2d237eb29413c8d44cef14af6efd /src/Indicator.h | |
parent | 1cdba1d42d7cdec5bad6071f297ca1ce60fb6119 (diff) | |
download | scintilla-mirror-6516d81f0ad2574e49732c0def87d19c5a23ddeb.tar.gz |
Convert enum to enum class. Add noexcept and const.
Diffstat (limited to 'src/Indicator.h')
-rw-r--r-- | src/Indicator.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Indicator.h b/src/Indicator.h index 24319df99..669d9a2d8 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -26,7 +26,7 @@ struct StyleAndColour { */ class Indicator { public: - enum DrawState { drawNormal, drawHover }; + enum class State { normal, hover }; StyleAndColour sacNormal; StyleAndColour sacHover; bool under; @@ -38,7 +38,7 @@ public: Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept : sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(0) { } - void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const; + void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const; bool IsDynamic() const noexcept { return !(sacNormal == sacHover); } @@ -48,7 +48,7 @@ public: int Flags() const noexcept { return attributes; } - void SetFlags(int attributes_); + void SetFlags(int attributes_) noexcept; }; } |