From 17af21fd421429b7a64c93c8b09e3f9ea436069a Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 2 Jul 2023 00:52:36 +1000 Subject: use raw wrapWidth ptr instead of Maybe --- source/rendering/StarTextPainter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/rendering/StarTextPainter.cpp') diff --git a/source/rendering/StarTextPainter.cpp b/source/rendering/StarTextPainter.cpp index 48837a0..c779c96 100644 --- a/source/rendering/StarTextPainter.cpp +++ b/source/rendering/StarTextPainter.cpp @@ -206,7 +206,7 @@ int TextPainter::stringWidth(StringView s) { return width; } -bool TextPainter::processWrapText(StringView text, Maybe wrapWidth, WrapTextCallback textFunc) { +bool TextPainter::processWrapText(StringView text, unsigned* wrapWidth, WrapTextCallback textFunc) { String font = m_renderSettings.font, setFont = font; m_fontTextureGroup.switchFont(font); int lines = 0; @@ -351,7 +351,7 @@ List TextPainter::wrapTextViews(StringView s, Maybe wrapWi return true; }; - processWrapText(s, wrapWidth, textCallback); + processWrapText(s, wrapWidth.ptr(), textCallback); if (active) views.push_back(current); @@ -374,7 +374,7 @@ StringList TextPainter::wrapText(StringView s, Maybe wrapWidth) { return true; }; - processWrapText(s, wrapWidth, textCallback); + processWrapText(s, wrapWidth.ptr(), textCallback); if (!current.empty()) result.append(move(current)); -- cgit v1.2.3