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 | 590b1615aaaa20916de1b5f25fc1050395f7312f (patch) | |
tree | cf3c7425ae7814cd71fe54f8f94550867375bb94 /src/Document.h | |
parent | 954d09cd99be5655bcc9bac8e80ca76994779db8 (diff) | |
download | scintilla-mirror-590b1615aaaa20916de1b5f25fc1050395f7312f.tar.gz |
Backport: Use noexcept where reasonable.
Backport of changeset 7287:0272b3c3a03b.
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 a50fcac70..2a546847b 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: ILexer *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; |