未验证 提交 21a6aa2c 编写于 作者: C Chris Bracken 提交者: GitHub

Make TextInputModel::selection_start/end const (#21685)

Neither of these methods mutate the state of the model.
上级 3905b9ec
......@@ -117,12 +117,12 @@ class TextInputModel {
size_t selection_extent_ = 0;
// Returns the left hand side of the selection.
size_t selection_start() {
size_t selection_start() const {
return std::min(selection_base_, selection_extent_);
}
// Returns the right hand side of the selection.
size_t selection_end() {
size_t selection_end() const {
return std::max(selection_base_, selection_extent_);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册