mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Misc ScopedPointer changes to start using reset() and get() rather than assignments and casts (part of an ongoing drift towards more std::unique_ptr compatibility)
This commit is contained in:
parent
c1bdfc6a55
commit
2dc9316420
131 changed files with 574 additions and 576 deletions
|
|
@ -405,7 +405,7 @@ void CodeEditorComponent::setTemporaryUnderlining (const Array<Range<int>>&)
|
|||
|
||||
Rectangle<int> CodeEditorComponent::getCaretRectangle()
|
||||
{
|
||||
return getLocalArea (caret, caret->getLocalBounds());
|
||||
return getLocalArea (caret.get(), caret->getLocalBounds());
|
||||
}
|
||||
|
||||
void CodeEditorComponent::setLineNumbersShown (const bool shouldBeShown)
|
||||
|
|
@ -413,7 +413,7 @@ void CodeEditorComponent::setLineNumbersShown (const bool shouldBeShown)
|
|||
if (showLineNumbers != shouldBeShown)
|
||||
{
|
||||
showLineNumbers = shouldBeShown;
|
||||
gutter = nullptr;
|
||||
gutter.reset();
|
||||
|
||||
if (shouldBeShown)
|
||||
addAndMakeVisible (gutter = new GutterComponent());
|
||||
|
|
@ -429,9 +429,9 @@ void CodeEditorComponent::setReadOnly (bool b) noexcept
|
|||
readOnly = b;
|
||||
|
||||
if (b)
|
||||
removeChildComponent (caret);
|
||||
removeChildComponent (caret.get());
|
||||
else
|
||||
addAndMakeVisible (caret);
|
||||
addAndMakeVisible (caret.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue