mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Another batch of ScopedPointer cleanups
This commit is contained in:
parent
5b13063162
commit
48a5fbd333
74 changed files with 311 additions and 292 deletions
|
|
@ -363,8 +363,8 @@ namespace TextLayoutHelpers
|
|||
Array<float> xOffsets;
|
||||
t.font.getGlyphPositions (getTrimmedEndIfNotAllWhitespace (t.text), newGlyphs, xOffsets);
|
||||
|
||||
if (currentRun == nullptr) currentRun = new TextLayout::Run();
|
||||
if (currentLine == nullptr) currentLine = new TextLayout::Line();
|
||||
if (currentRun == nullptr) currentRun .reset (new TextLayout::Run());
|
||||
if (currentLine == nullptr) currentLine.reset (new TextLayout::Line());
|
||||
|
||||
if (newGlyphs.size() > 0)
|
||||
{
|
||||
|
|
@ -404,7 +404,7 @@ namespace TextLayoutHelpers
|
|||
if (t.line != nextToken->line)
|
||||
{
|
||||
if (currentRun == nullptr)
|
||||
currentRun = new TextLayout::Run();
|
||||
currentRun.reset (new TextLayout::Run());
|
||||
|
||||
addRun (*currentLine, currentRun.release(), t, runStartPosition, charPosition);
|
||||
currentLine->stringRange = { lineStartPosition, charPosition };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue