1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

SimpleShapedText: Avoid MSVC compiler bug for C++20 builds

There appears to be a bug in the MSVC compiler relating to cpaturing
a instance of a struct defined inside a lambda
This commit is contained in:
Anthony Nicholls 2024-09-20 17:29:05 +01:00
parent 5e4016b4fb
commit 0e608f77fa

View file

@ -1022,6 +1022,12 @@ void SimpleShapedText::shape (const String& data,
yes
};
struct ConsumedGlyphs
{
std::vector<ShapedGlyph> glyphs;
Range<int64> textRange;
};
const auto append = [&] (const BidiParagraph& bidiParagraph, Range<int64> range, const ShapingParams& shapingParams)
{
jassert (! range.isEmpty());
@ -1113,12 +1119,6 @@ void SimpleShapedText::shape (const String& data,
jassert (bestMatch.has_value());
struct ConsumedGlyphs
{
std::vector<ShapedGlyph> glyphs;
Range<int64> textRange;
};
const auto consumeGlyphs = [&]() -> ConsumedGlyphs
{
auto glyphs = [&]