Skip to content

Commit 7b07ebe

Browse files
cbrackengspencergoog
authored andcommitted
Make TextInputModel::selection_start/end const (flutter#21685)
Neither of these methods mutate the state of the model.
1 parent c65c6d1 commit 7b07ebe

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)