From b20c3b551a4a87888cf00e5f7da22d836015a073 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Oct 2023 09:11:27 +1100 Subject: Use global constants for opaque black and white and local constants for greys. Makes it easier to understand and reduces warnings. --- src/Indicator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Indicator.h') diff --git a/src/Indicator.h b/src/Indicator.h index fc17a82c2..5bdccaf33 100644 --- a/src/Indicator.h +++ b/src/Indicator.h @@ -15,7 +15,7 @@ struct StyleAndColour { ColourRGBA fore; StyleAndColour() noexcept : style(Scintilla::IndicatorStyle::Plain), fore(0, 0, 0) { } - StyleAndColour(Scintilla::IndicatorStyle style_, ColourRGBA fore_ = ColourRGBA(0, 0, 0)) noexcept : style(style_), fore(fore_) { + StyleAndColour(Scintilla::IndicatorStyle style_, ColourRGBA fore_ = black) noexcept : style(style_), fore(fore_) { } bool operator==(const StyleAndColour &other) const noexcept { return (style == other.style) && (fore == other.fore); @@ -36,7 +36,7 @@ public: XYPOSITION strokeWidth = 1.0f; Indicator() noexcept : under(false), fillAlpha(30), outlineAlpha(50), attributes(Scintilla::IndicFlag::None) { } - Indicator(Scintilla::IndicatorStyle style_, ColourRGBA fore_= ColourRGBA(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept : + Indicator(Scintilla::IndicatorStyle style_, ColourRGBA fore_= black, bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) noexcept : sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(Scintilla::IndicFlag::None) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, State drawState, int value) const; -- cgit v1.2.3