diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-28 09:37:22 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-28 09:37:22 +1000 |
commit | 6a542f10f35a7f6182335250ac6fb25dbd230cac (patch) | |
tree | 8579d35a88cfbb6c8644fc938176c22058e85561 /src/CellBuffer.h | |
parent | 8be8298fd9fadccef7caa8cc4232f53a2f4b91fb (diff) | |
download | scintilla-mirror-6a542f10f35a7f6182335250ac6fb25dbd230cac.tar.gz |
Declare reading methods as noexcept where reasonable.
Diffstat (limited to 'src/CellBuffer.h')
-rw-r--r-- | src/CellBuffer.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 7d5682260..599f3b3f6 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -81,7 +81,7 @@ public: /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); - bool IsSavePoint() const; + bool IsSavePoint() const noexcept; // Tentative actions are used for input composition so that it can be undone cleanly void TentativeStart(); @@ -91,11 +91,11 @@ public: /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. - bool CanUndo() const; + bool CanUndo() const noexcept; int StartUndo(); const Action &GetUndoStep() const; void CompletedUndoStep(); - bool CanRedo() const; + bool CanRedo() const noexcept; int StartRedo(); const Action &GetRedoStep() const; void CompletedRedoStep(); @@ -121,7 +121,7 @@ private: std::unique_ptr<ILineVector> plv; - bool UTF8LineEndOverlaps(Sci::Position position) const; + bool UTF8LineEndOverlaps(Sci::Position position) const noexcept; bool UTF8IsCharacterBoundary(Sci::Position position) const; void ResetLineEnds(); void RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineLast); @@ -148,14 +148,14 @@ public: void GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const; const char *BufferPointer(); const char *RangePointer(Sci::Position position, Sci::Position rangeLength); - Sci::Position GapPosition() const; + Sci::Position GapPosition() const noexcept; Sci::Position Length() const noexcept; void Allocate(Sci::Position newSize); void SetUTF8Substance(bool utf8Substance_); - int GetLineEndTypes() const { return utf8LineEnds; } + int GetLineEndTypes() const noexcept { return utf8LineEnds; } void SetLineEndTypes(int utf8LineEnds_); - bool ContainsLineEnd(const char *s, Sci::Position length) const; + bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept; void SetPerLine(PerLine *pl); int LineCharacterIndex() const noexcept; void AllocateLineCharacterIndex(int lineCharacterIndex); @@ -176,23 +176,23 @@ public: const char *DeleteChars(Sci::Position position, Sci::Position deleteLength, bool &startSequence); - bool IsReadOnly() const; + bool IsReadOnly() const noexcept; void SetReadOnly(bool set); - bool IsLarge() const; - bool HasStyles() const; + bool IsLarge() const noexcept; + bool HasStyles() const noexcept; /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); - bool IsSavePoint() const; + bool IsSavePoint() const noexcept; void TentativeStart(); void TentativeCommit(); - bool TentativeActive() const; + bool TentativeActive() const noexcept; int TentativeSteps(); bool SetUndoCollection(bool collectUndo); - bool IsCollectingUndo() const; + bool IsCollectingUndo() const noexcept; void BeginUndoAction(); void EndUndoAction(); void AddUndoAction(Sci::Position token, bool mayCoalesce); @@ -200,11 +200,11 @@ public: /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. - bool CanUndo() const; + bool CanUndo() const noexcept; int StartUndo(); const Action &GetUndoStep() const; void PerformUndoStep(); - bool CanRedo() const; + bool CanRedo() const noexcept; int StartRedo(); const Action &GetRedoStep() const; void PerformRedoStep(); |