1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Made a lot of the functions that used to return a raw XmlElement* instead return a std::unique_ptr<XmlElement> to make it safer and more concise to capture them. Also added new methods to XmlElement for generating text, and deprecated the old ones

This commit is contained in:
jules 2018-10-16 15:37:55 +01:00
parent bb5b534ab8
commit 2e2cfb5f6c
48 changed files with 373 additions and 362 deletions

View file

@ -315,9 +315,7 @@ void ProjectContentComponent::reloadLastOpenDocuments()
{
if (project != nullptr)
{
std::unique_ptr<XmlElement> xml (project->getStoredProperties().getXmlValue ("lastDocs"));
if (xml != nullptr)
if (auto xml = project->getStoredProperties().getXmlValue ("lastDocs"))
{
recentDocumentList.restoreFromXML (*project, *xml);
showDocument (recentDocumentList.getCurrentDocument(), true);