mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Minor code clean-ups.
This commit is contained in:
parent
a9c2f2c69e
commit
23e07daec7
23 changed files with 1736 additions and 1782 deletions
|
|
@ -78,8 +78,7 @@ ResizableWindow::~ResizableWindow()
|
|||
{
|
||||
resizableCorner = 0;
|
||||
resizableBorder = 0;
|
||||
delete static_cast <Component*> (contentComponent);
|
||||
contentComponent = 0;
|
||||
contentComponent.deleteAndZero();
|
||||
|
||||
// have you been adding your own components directly to this window..? tut tut tut.
|
||||
// Read the instructions for using a ResizableWindow!
|
||||
|
|
@ -106,8 +105,8 @@ void ResizableWindow::setContentComponent (Component* const newContentComponent,
|
|||
if (newContentComponent != static_cast <Component*> (contentComponent))
|
||||
{
|
||||
if (deleteOldOne)
|
||||
delete static_cast <Component*> (contentComponent); // (avoid using a scoped pointer for this, so that it survives
|
||||
// external deletion of the content comp)
|
||||
contentComponent.deleteAndZero(); // (avoid using a scoped pointer for this, so that it survives
|
||||
// external deletion of the content comp)
|
||||
else
|
||||
removeChildComponent (contentComponent);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue