From cc3c30d2d9e561dddc4b556d75dd318b7ea7c983 Mon Sep 17 00:00:00 2001 From: whistooy <149784969+whistooy@users.noreply.github.com> Date: Sat, 15 Aug 2026 13:41:45 +0800 Subject: [PATCH] Fix -Wrestrict warning with gcc in initParagraphBidi() Silence a false positive GCC warning. Checking _paragraphLength <= 0 prevents the compiler from thinking the length might be negative. --- ui/text/text_renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/text/text_renderer.cpp b/ui/text/text_renderer.cpp index c27730d65..456da51ce 100644 --- a/ui/text/text_renderer.cpp +++ b/ui/text/text_renderer.cpp @@ -535,7 +535,7 @@ void Renderer::initNextLine() { } void Renderer::initParagraphBidi() { - if (!_paragraphLength || !_paragraphAnalysis.isEmpty()) { + if (_paragraphLength <= 0 || !_paragraphAnalysis.isEmpty()) { return; }