aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-03 15:35:54 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-03 15:35:54 +1100
commit590b1615aaaa20916de1b5f25fc1050395f7312f (patch)
treecf3c7425ae7814cd71fe54f8f94550867375bb94 /src/EditView.cxx
parent954d09cd99be5655bcc9bac8e80ca76994779db8 (diff)
downloadscintilla-mirror-590b1615aaaa20916de1b5f25fc1050395f7312f.tar.gz
Backport: Use noexcept where reasonable.
Backport of changeset 7287:0272b3c3a03b.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 31885ba62..24be8b974 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -63,7 +63,7 @@ static inline bool IsControlCharacter(int ch) {
return ch >= 0 && ch < ' ';
}
-PrintParameters::PrintParameters() {
+PrintParameters::PrintParameters() noexcept {
magnification = 0;
colourMode = SC_PRINT_NORMAL;
wrapState = eWrapWord;
@@ -193,25 +193,25 @@ EditView::EditView() {
EditView::~EditView() {
}
-bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) {
+bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) noexcept {
const PhasesDraw phasesDrawNew = twoPhaseDraw ? phasesTwo : phasesOne;
const bool redraw = phasesDraw != phasesDrawNew;
phasesDraw = phasesDrawNew;
return redraw;
}
-bool EditView::SetPhasesDraw(int phases) {
+bool EditView::SetPhasesDraw(int phases) noexcept {
const PhasesDraw phasesDrawNew = static_cast<PhasesDraw>(phases);
const bool redraw = phasesDraw != phasesDrawNew;
phasesDraw = phasesDrawNew;
return redraw;
}
-bool EditView::LinesOverlap() const {
+bool EditView::LinesOverlap() const noexcept {
return phasesDraw == phasesMultiple;
}
-void EditView::ClearAllTabstops() {
+void EditView::ClearAllTabstops() noexcept {
ldTabstops.reset();
}
@@ -279,7 +279,7 @@ void EditView::AllocateGraphics(const ViewStyle &vsDraw) {
pixmapIndentGuideHighlight.reset(Surface::Allocate(vsDraw.technology));
}
-static const char *ControlCharacterString(unsigned char ch) {
+static const char *ControlCharacterString(unsigned char ch) noexcept {
const char * const reps[] = {
"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
"BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI",
@@ -762,7 +762,7 @@ Sci::Position EditView::StartEndDisplayLine(Surface *surface, const EditModel &m
return posRet;
}
-static ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main, bool primarySelection) {
+static ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main, bool primarySelection) noexcept {
return main ?
(primarySelection ? vsDraw.selColours.back : vsDraw.selBackground2) :
vsDraw.selAdditionalBackground;
@@ -2198,7 +2198,7 @@ void EditView::FillLineRemainder(Surface *surface, const EditModel &model, const
// Space (3 space characters) between line numbers and text when printing.
#define lineNumberPrintSpace " "
-static ColourDesired InvertedLight(ColourDesired orig) {
+static ColourDesired InvertedLight(ColourDesired orig) noexcept {
unsigned int r = orig.GetRed();
unsigned int g = orig.GetGreen();
unsigned int b = orig.GetBlue();