From ee8d310e696ec850e965864004aa7cfe7ecb591f Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 5 Sep 2024 15:56:39 +0100 Subject: [PATCH] ShapedText: Refactor Impl constructor --- modules/juce_graphics/fonts/juce_ShapedText.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/juce_graphics/fonts/juce_ShapedText.cpp b/modules/juce_graphics/fonts/juce_ShapedText.cpp index 4e999ba6e6..4405c71e81 100644 --- a/modules/juce_graphics/fonts/juce_ShapedText.cpp +++ b/modules/juce_graphics/fonts/juce_ShapedText.cpp @@ -106,9 +106,7 @@ class ShapedText::Impl public: Impl (String textIn, Options optionsIn) : options { std::move (optionsIn) }, - text { std::move (textIn) }, - simpleShapedText { &text, options }, - justifiedText { simpleShapedText, options } + text { std::move (textIn) } { } @@ -145,8 +143,8 @@ public: private: ShapedTextOptions options; String text; - SimpleShapedText simpleShapedText; - JustifiedText justifiedText; + SimpleShapedText simpleShapedText { &text, options }; + JustifiedText justifiedText { simpleShapedText, options }; }; ShapedText::ShapedText() : ShapedText ("", {})