diff options
author | Neil <nyamatongwe@gmail.com> | 2019-03-03 15:35:54 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-03-03 15:35:54 +1100 |
commit | e55ed4dd7a0caf0b4a6fdb4e6e2b30e159e772d2 (patch) | |
tree | 0e16ee5421bb805ee7f330442c761d1332db8fee /src/EditView.cxx | |
parent | cb1710ea96ba303fcf62be5911c54137238906ce (diff) | |
download | scintilla-mirror-e55ed4dd7a0caf0b4a6fdb4e6e2b30e159e772d2.tar.gz |
Use noexcept where reasonable.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 4417525b8..a29df0f2f 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -63,7 +63,7 @@ static constexpr bool IsControlCharacter(int ch) noexcept { return ch >= 0 && ch < ' '; } -PrintParameters::PrintParameters() { +PrintParameters::PrintParameters() noexcept { magnification = 0; colourMode = SC_PRINT_NORMAL; wrapState = eWrapWord; @@ -192,25 +192,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(); } @@ -278,7 +278,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", @@ -825,7 +825,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; @@ -2335,7 +2335,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(); |