Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 21a6aa2

Browse files
authored
Make TextInputModel::selection_start/end const (#21685)
Neither of these methods mutate the state of the model.
1 parent 3905b9e commit 21a6aa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shell/platform/common/cpp/text_input_model.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ class TextInputModel {
117117
size_t selection_extent_ = 0;
118118

119119
// Returns the left hand side of the selection.
120-
size_t selection_start() {
120+
size_t selection_start() const {
121121
return std::min(selection_base_, selection_extent_);
122122
}
123123

124124
// Returns the right hand side of the selection.
125-
size_t selection_end() {
125+
size_t selection_end() const {
126126
return std::max(selection_base_, selection_extent_);
127127
}
128128
};

0 commit comments

Comments
 (0)