diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-03-24 23:04:11 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-03-24 23:04:11 +1100 | 
| commit | c98b190d47f6adb869305baf6ee8447de79d463e (patch) | |
| tree | 3781eadab4fc513ed7bbf509de7ac609af5fd57e /src/CellBuffer.h | |
| parent | ae9dd542f45fb64c97361737dd9d4896949644c8 (diff) | |
| download | scintilla-mirror-c98b190d47f6adb869305baf6ee8447de79d463e.tar.gz | |
Use noexcept where possible.
Diffstat (limited to 'src/CellBuffer.h')
| -rw-r--r-- | src/CellBuffer.h | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 599f3b3f6..5138fd0aa 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -37,7 +37,7 @@ public:  	Sci::Position lenData;  	bool mayCoalesce; -	Action(); +	Action() noexcept;  	// Deleted so Action objects can not be copied.  	Action(const Action &other) = delete;  	Action &operator=(const Action &other) = delete; @@ -46,7 +46,7 @@ public:  	Action(Action &&other) noexcept = default;  	~Action();  	void Create(actionType at_, Sci::Position position_=0, const char *data_=nullptr, Sci::Position lenData_=0, bool mayCoalesce_=true); -	void Clear(); +	void Clear() noexcept;  };  /** @@ -80,14 +80,14 @@ 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(); +	void SetSavePoint() noexcept;  	bool IsSavePoint() const noexcept;  	// Tentative actions are used for input composition so that it can be undone cleanly  	void TentativeStart();  	void TentativeCommit(); -	bool TentativeActive() const noexcept { return tentativePoint >= 0; } -	int TentativeSteps(); +	bool TentativeActive() const noexcept; +	int TentativeSteps() noexcept;  	/// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is  	/// called that many times. Similarly for redo. @@ -147,16 +147,16 @@ public:  	char StyleAt(Sci::Position position) const noexcept;  	void GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const;  	const char *BufferPointer(); -	const char *RangePointer(Sci::Position position, Sci::Position rangeLength); +	const char *RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept;  	Sci::Position GapPosition() const noexcept;  	Sci::Position Length() const noexcept;  	void Allocate(Sci::Position newSize); -	void SetUTF8Substance(bool utf8Substance_); +	void SetUTF8Substance(bool utf8Substance_) noexcept;  	int GetLineEndTypes() const noexcept { return utf8LineEnds; }  	void SetLineEndTypes(int utf8LineEnds_);  	bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept; -	void SetPerLine(PerLine *pl); +	void SetPerLine(PerLine *pl) noexcept;  	int LineCharacterIndex() const noexcept;  	void AllocateLineCharacterIndex(int lineCharacterIndex);  	void ReleaseLineCharacterIndex(int lineCharacterIndex); @@ -171,13 +171,13 @@ public:  	/// Setting styles for positions outside the range of the buffer is safe and has no effect.  	/// @return true if the style of a character is changed. -	bool SetStyleAt(Sci::Position position, char styleValue); +	bool SetStyleAt(Sci::Position position, char styleValue) noexcept;  	bool SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue);  	const char *DeleteChars(Sci::Position position, Sci::Position deleteLength, bool &startSequence);  	bool IsReadOnly() const noexcept; -	void SetReadOnly(bool set); +	void SetReadOnly(bool set) noexcept;  	bool IsLarge() const noexcept;  	bool HasStyles() const noexcept; @@ -189,7 +189,7 @@ public:  	void TentativeStart();  	void TentativeCommit();  	bool TentativeActive() const noexcept; -	int TentativeSteps(); +	int TentativeSteps() noexcept;  	bool SetUndoCollection(bool collectUndo);  	bool IsCollectingUndo() const noexcept; | 
