aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-02-29 09:11:59 +1100
committerNeil <nyamatongwe@gmail.com>2020-02-29 09:11:59 +1100
commit1f65de4a7d348ff5018c76ad8067a4b360047956 (patch)
tree9e7c74279e50dd9f6fe037315f3e33dcc4854035 /src/Editor.h
parent95ecd4d0e34290dbd054a8710a255a9e93347c5f (diff)
downloadscintilla-mirror-1f65de4a7d348ff5018c76ad8067a4b360047956.tar.gz
Add const and noexcept where they make sense.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h8
1 files changed, 4 insertions, 4 deletions
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());