diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-06-10 13:33:03 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-06-10 13:33:03 +1000 | 
| commit | 2d87b5e5e8058c3ca4f574deb08305e3ae5812ff (patch) | |
| tree | 52901b7addc1c3ee2195e9d6133fe3572b74502e /src/Document.cxx | |
| parent | dc54c96dc1a32afeae5705360b7f6cc8b51c887e (diff) | |
| download | scintilla-mirror-2d87b5e5e8058c3ca4f574deb08305e3ae5812ff.tar.gz | |
Using noexcept for simple functions.
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 31e40f7db..f3d8557ac 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1071,7 +1071,7 @@ static inline bool IsSpaceOrTab(int ch) noexcept {  //   2) Break before punctuation  //   3) Break after whole character -int Document::SafeSegment(const char *text, int length, int lengthSegment) const { +int Document::SafeSegment(const char *text, int length, int lengthSegment) const noexcept {  	if (length <= lengthSegment)  		return length;  	int lastSpaceBreak = -1; @@ -1105,7 +1105,7 @@ int Document::SafeSegment(const char *text, int length, int lengthSegment) const  	return lastEncodingAllowedBreak;  } -EncodingFamily Document::CodePageFamily() const { +EncodingFamily Document::CodePageFamily() const noexcept {  	if (SC_CP_UTF8 == dbcsCodePage)  		return efUnicode;  	else if (dbcsCodePage) @@ -1114,7 +1114,7 @@ EncodingFamily Document::CodePageFamily() const {  		return efEightBit;  } -void Document::ModifiedAt(Sci::Position pos) { +void Document::ModifiedAt(Sci::Position pos) noexcept {  	if (endStyled > pos)  		endStyled = pos;  } @@ -1906,7 +1906,7 @@ bool Document::MatchesWordOptions(bool word, bool wordStart, Sci::Position pos,  			(wordStart && IsWordStartAt(pos));  } -bool Document::HasCaseFolder() const { +bool Document::HasCaseFolder() const noexcept {  	return pcf != nullptr;  } @@ -2105,7 +2105,7 @@ const char *Document::SubstituteByPosition(const char *text, Sci::Position *leng  		return 0;  } -Sci::Line Document::LinesTotal() const { +Sci::Line Document::LinesTotal() const noexcept {  	return cb.Lines();  } @@ -2329,7 +2329,7 @@ void Document::AnnotationClearAll() {  	Annotations()->ClearAll();  } -void Document::IncrementStyleClock() { +void Document::IncrementStyleClock() noexcept {  	styleClock = (styleClock + 1) % 0x100000;  } | 
