aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/TextRenderObject.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-02-08 15:12:29 +0800
committercrupest <crupest@outlook.com>2024-02-08 15:12:29 +0800
commitf3af6c7e5b46f4209a4981e5d7be217368f40b15 (patch)
treee932747ad91a718abb667a6170b21f1521a04d1e /src/ui/render/TextRenderObject.cpp
parentbfe23251a54b036abef9241ba0994c9e51db25b2 (diff)
downloadcru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.gz
cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.tar.bz2
cru-f3af6c7e5b46f4209a4981e5d7be217368f40b15.zip
Get rid of GSL.
Diffstat (limited to 'src/ui/render/TextRenderObject.cpp')
-rw-r--r--src/ui/render/TextRenderObject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp
index 11548106..135c2d02 100644
--- a/src/ui/render/TextRenderObject.cpp
+++ b/src/ui/render/TextRenderObject.cpp
@@ -77,7 +77,7 @@ std::vector<Rect> TextRenderObject::TextRangeRect(const TextRange& text_range) {
return text_layout_->TextRangeRect(text_range);
}
-Rect TextRenderObject::TextSinglePoint(gsl::index position, bool trailing) {
+Rect TextRenderObject::TextSinglePoint(Index position, bool trailing) {
return text_layout_->TextSinglePoint(position, trailing);
}
@@ -107,7 +107,7 @@ void TextRenderObject::SetDrawCaret(bool draw_caret) {
}
}
-void TextRenderObject::SetCaretPosition(gsl::index position) {
+void TextRenderObject::SetCaretPosition(Index position) {
if (position != caret_position_) {
caret_position_ = position;
if (draw_caret_) {
@@ -136,7 +136,7 @@ void TextRenderObject::SetCaretWidth(const float width) {
Rect TextRenderObject::GetCaretRectInContent() {
auto caret_pos = this->caret_position_;
- gsl::index text_size = this->GetText().size();
+ Index text_size = this->GetText().size();
if (caret_pos < 0) {
caret_pos = 0;
} else if (caret_pos > text_size) {