From f3af6c7e5b46f4209a4981e5d7be217368f40b15 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 8 Feb 2024 15:12:29 +0800 Subject: Get rid of GSL. --- src/ui/render/TextRenderObject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/render/TextRenderObject.cpp') 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 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) { -- cgit v1.2.3