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/Document.h | |
parent | cb1710ea96ba303fcf62be5911c54137238906ce (diff) | |
download | scintilla-mirror-e55ed4dd7a0caf0b4a6fdb4e6e2b30e159e772d2.tar.gz |
Use noexcept where reasonable.
Diffstat (limited to 'src/Document.h')
-rw-r--r-- | src/Document.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Document.h b/src/Document.h index d2671d182..3eeeef029 100644 --- a/src/Document.h +++ b/src/Document.h @@ -126,11 +126,11 @@ struct StyledText { class HighlightDelimiter { public: - HighlightDelimiter() : isEnabled(false) { + HighlightDelimiter() noexcept : isEnabled(false) { Clear(); } - void Clear() { + void Clear() noexcept { beginFoldBlock = -1; endFoldBlock = -1; firstChangeableLineBefore = -1; @@ -174,13 +174,13 @@ protected: ILexer4 *instance; bool performingStyle; ///< Prevent reentrance public: - explicit LexInterface(Document *pdoc_) : pdoc(pdoc_), instance(nullptr), performingStyle(false) { + explicit LexInterface(Document *pdoc_) noexcept : pdoc(pdoc_), instance(nullptr), performingStyle(false) { } virtual ~LexInterface() { } void Colourise(Sci::Position start, Sci::Position end); virtual int LineEndTypesSupported(); - bool UseContainerLexing() const { + bool UseContainerLexing() const noexcept { return instance == nullptr; } }; @@ -578,7 +578,7 @@ public: virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; - virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyDeleted(Document *doc, void *userData) noexcept = 0; virtual void NotifyStyleNeeded(Document *doc, void *userData, Sci::Position endPos) = 0; virtual void NotifyLexerChanged(Document *doc, void *userData) = 0; virtual void NotifyErrorOccurred(Document *doc, void *userData, int status) = 0; |