mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made a lot of ScopedPointer usage conform to the std::unique_ptr interface
This commit is contained in:
parent
2d9fc46b4e
commit
4229dc0a4f
99 changed files with 6809 additions and 498 deletions
|
|
@ -94,10 +94,10 @@ CameraDevice* CameraDevice::openDevice (int index,
|
|||
int maxWidth, int maxHeight,
|
||||
bool useHighQuality)
|
||||
{
|
||||
if (ScopedPointer<CameraDevice> d = new CameraDevice (getAvailableDevices() [index], index,
|
||||
minWidth, minHeight, maxWidth, maxHeight, useHighQuality))
|
||||
if (d->pimpl->openedOk())
|
||||
return d.release();
|
||||
ScopedPointer<CameraDevice> d (new CameraDevice (getAvailableDevices() [index], index,
|
||||
minWidth, minHeight, maxWidth, maxHeight, useHighQuality));
|
||||
if (d != nullptr && d->pimpl->openedOk())
|
||||
return d.release();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue