mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
A few more internal updates for better smart pointer use
This commit is contained in:
parent
49fa0f73e4
commit
c6d1828a32
8 changed files with 39 additions and 50 deletions
|
|
@ -575,9 +575,9 @@ static void forgetRecentFile (const File& file)
|
|||
//==============================================================================
|
||||
Result Project::loadDocument (const File& file)
|
||||
{
|
||||
auto xml = parseXML (file);
|
||||
auto xml = parseXMLIfTagMatches (file, Ids::JUCERPROJECT.toString());
|
||||
|
||||
if (xml == nullptr || ! xml->hasTagName (Ids::JUCERPROJECT.toString()))
|
||||
if (xml == nullptr)
|
||||
return Result::fail ("Not a valid Jucer project!");
|
||||
|
||||
auto newTree = ValueTree::fromXml (*xml);
|
||||
|
|
@ -1239,7 +1239,7 @@ std::unique_ptr<Drawable> Project::Item::loadAsImageFile() const
|
|||
return nullptr;
|
||||
|
||||
if (isValid())
|
||||
return std::unique_ptr<Drawable> (Drawable::createFromImageFile (getFile()));
|
||||
return Drawable::createFromImageFile (getFile());
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue