diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-28 09:37:22 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-28 09:37:22 +1000 |
commit | a62e4cd6be774fe93835f5b2657142dbda8186f3 (patch) | |
tree | 5c2f0184e368c62946a37ef4208dcc90f417faaa /src/Indicator.h | |
parent | fa93bd28150e92b485ef6f094fda8a1ba5a5ed65 (diff) | |
download | scintilla-mirror-a62e4cd6be774fe93835f5b2657142dbda8186f3.tar.gz |
Backport: Declare reading methods as noexcept where reasonable.
Backport of changeset 7482:340b721ecdf4.
Diffstat (limited to 'src/Indicator.h')
-rw-r--r-- | src/Indicator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Indicator.h b/src/Indicator.h index 9e5fda221..24319df99 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -17,7 +17,7 @@ struct StyleAndColour { } StyleAndColour(int style_, ColourDesired fore_ = ColourDesired(0, 0, 0)) noexcept : style(style_), fore(fore_) { } - bool operator==(const StyleAndColour &other) const { + bool operator==(const StyleAndColour &other) const noexcept { return (style == other.style) && (fore == other.fore); } }; @@ -39,13 +39,13 @@ public: 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; - bool IsDynamic() const { + bool IsDynamic() const noexcept { return !(sacNormal == sacHover); } - bool OverridesTextFore() const { + bool OverridesTextFore() const noexcept { return sacNormal.style == INDIC_TEXTFORE || sacHover.style == INDIC_TEXTFORE; } - int Flags() const { + int Flags() const noexcept { return attributes; } void SetFlags(int attributes_); |