aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-11 10:08:29 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-11 10:08:29 +1000
commita2931677c6e28aad5ddd56d82e5a8814746dc5fd (patch)
treed8c143a1ebcb4e91717d241c38ec43bf1da9e6ac /src/ViewStyle.cxx
parentb34e1a6efefd7b39f14daa867510b2e2d453a0bb (diff)
downloadscintilla-mirror-a2931677c6e28aad5ddd56d82e5a8814746dc5fd.tar.gz
Use noexcept where safe and maintainable.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 92c94bf5a..b23d7d695 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -154,7 +154,7 @@ ViewStyle::~ViewStyle() {
fonts.clear();
}
-void ViewStyle::CalculateMarginWidthAndMask() {
+void ViewStyle::CalculateMarginWidthAndMask() noexcept {
fixedColumnWidth = marginInside ? leftMarginWidth : 0;
maskInLine = 0xffffffff;
int maskDefinedMarkers = 0;
@@ -401,7 +401,7 @@ int ViewStyle::ExternalMarginWidth() const noexcept {
return marginInside ? 0 : fixedColumnWidth;
}
-int ViewStyle::MarginFromLocation(Point pt) const {
+int ViewStyle::MarginFromLocation(Point pt) const noexcept {
int margin = -1;
int x = marginInside ? 0 : -fixedColumnWidth;
for (size_t i = 0; i < ms.size(); i++) {
@@ -416,7 +416,7 @@ bool ViewStyle::ValidStyle(size_t styleIndex) const noexcept {
return styleIndex < styles.size();
}
-void ViewStyle::CalcLargestMarkerHeight() {
+void ViewStyle::CalcLargestMarkerHeight() noexcept {
largestMarkerHeight = 0;
for (const LineMarker &marker : markers) {
switch (marker.markType) {
@@ -447,7 +447,7 @@ bool ViewStyle::IsLineFrameOpaque(bool caretActive, bool lineContainsCaret) cons
// display itself (as long as it's not an SC_MARK_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.
-ColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const {
+ColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const noexcept {
ColourOptional background;
if (!caretLineFrame && (caretActive || alwaysShowCaretLineBackground) && showCaretLineBackground &&
(caretLineAlpha == SC_ALPHA_NOALPHA) && lineContainsCaret) {
@@ -493,7 +493,7 @@ bool ViewStyle::WhiteSpaceVisible(bool inIndent) const noexcept {
viewWhitespace == wsVisibleAlways;
}
-ColourDesired ViewStyle::WrapColour() const {
+ColourDesired ViewStyle::WrapColour() const noexcept {
if (whitespaceColours.fore.isSet)
return whitespaceColours.fore;
else