diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 8 | ||||
| -rw-r--r-- | src/Editor.h | 8 | 
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index d8d231911..2709e3d3d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -565,7 +565,7 @@ Sci::Position Editor::CurrentPosition() const {  	return sel.MainCaret();  } -bool Editor::SelectionEmpty() const { +bool Editor::SelectionEmpty() const noexcept {  	return sel.Empty();  } @@ -789,7 +789,7 @@ void Editor::MultipleSelectAdd(AddNumber addNumber) {  	}  } -bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const { +bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept {  	if (vs.ProtectionActive()) {  		if (start > end) {  			const Sci::Position t = start; @@ -804,7 +804,7 @@ bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) cons  	return false;  } -bool Editor::SelectionContainsProtected() { +bool Editor::SelectionContainsProtected() const {  	for (size_t r=0; r<sel.Count(); r++) {  		if (RangeContainsProtected(sel.Range(r).Start().Position(),  			sel.Range(r).End().Position())) { @@ -1924,7 +1924,7 @@ void Editor::InsertCharacter(std::string_view sv, CharacterSource charSource) {  		}  		// Order selections by position in document.  		std::sort(selPtrs.begin(), selPtrs.end(), -			[](const SelectionRange *a, const SelectionRange *b) {return *a < *b;}); +			[](const SelectionRange *a, const SelectionRange *b) noexcept {return *a < *b;});  		// Loop in reverse to avoid disturbing positions of selections yet to be processed.  		for (std::vector<SelectionRange *>::reverse_iterator rit = selPtrs.rbegin(); diff --git a/src/Editor.h b/src/Editor.h index 374639d4c..57f8e5f22 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -312,7 +312,7 @@ protected:	// ScintillaBase subclass needs access to much of Editor  		return ((virtualSpaceOptions & SCVS_USERACCESSIBLE) != 0);  	}  	Sci::Position CurrentPosition() const; -	bool SelectionEmpty() const; +	bool SelectionEmpty() const noexcept;  	SelectionPosition SelectionStart();  	SelectionPosition SelectionEnd();  	void SetRectangularRange(); @@ -328,8 +328,8 @@ protected:	// ScintillaBase subclass needs access to much of Editor  	void SetEmptySelection(Sci::Position currentPos_);  	enum AddNumber { addOne, addEach };  	void MultipleSelectAdd(AddNumber addNumber); -	bool RangeContainsProtected(Sci::Position start, Sci::Position end) const; -	bool SelectionContainsProtected(); +	bool RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept; +	bool SelectionContainsProtected() const;  	Sci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd=true) const;  	SelectionPosition MovePositionOutsideChar(SelectionPosition pos, Sci::Position moveDir, bool checkLineEnd=true) const;  	void MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, @@ -640,7 +640,7 @@ class AutoSurface {  private:  	std::unique_ptr<Surface> surf;  public: -	AutoSurface(Editor *ed, int technology = -1) { +	AutoSurface(const Editor *ed, int technology = -1) {  		if (ed->wMain.GetID()) {  			surf.reset(Surface::Allocate(technology != -1 ? technology : ed->technology));  			surf->Init(ed->wMain.GetID());  | 
