diff options
author | Neil <nyamatongwe@gmail.com> | 2022-12-09 13:54:57 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-12-09 13:54:57 +1100 |
commit | 4bae79983a02af9c822a714f3dba48c52f347629 (patch) | |
tree | 62b06832e2549cdfcaa1808cf21e22397cc64985 /src/ViewStyle.cxx | |
parent | 8895da569aa861143b5fd1dbf3bfc7de52594158 (diff) | |
download | scintilla-mirror-4bae79983a02af9c822a714f3dba48c52f347629.tar.gz |
Shorten code with ColourOptional alias for std::optional<ColourRGBA>.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index a79e60102..19a7b5275 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -530,8 +530,8 @@ bool ViewStyle::IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) cons // display itself (as long as it's not an MarkerSymbol::Empty marker). These are checked in order // with the earlier taking precedence. When multiple markers cause background override, // the colour for the highest numbered one is used. -std::optional<ColourRGBA> ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const { - std::optional<ColourRGBA> background; +ColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const { + ColourOptional background; if (!caretLine.frame && (caretActive || caretLine.alwaysShow) && (caretLine.layer == Layer::Base) && lineContainsCaret) { background = ElementColour(Element::CaretLineBack); @@ -601,7 +601,7 @@ void ViewStyle::AddMultiEdge(int column, ColourRGBA colour) { EdgeProperties(column, colour)); } -std::optional<ColourRGBA> ViewStyle::ElementColour(Element element) const { +ColourOptional ViewStyle::ElementColour(Element element) const { ElementMap::const_iterator search = elementColours.find(element); if (search != elementColours.end()) { if (search->second.has_value()) { |