Need some help with updating an old code

Hello there,

I am currently trying to update the old code of a rendering-software for the wave-field-synthesis system at our university. Inside a MainComponent method called saveProject() the following lines of code:

    // create device element and add it to main node
XmlElement* audioDeviceNode = _audioDeviceManager.createStateXml();

give me the following errror message:

Error C2440 ‘initializing’: cannot convert from ‘std::unique_ptr<juce::XmlElement,std::default_deletejuce::XmlElement>’ to ‘juce::XmlElement *’

I’d be super glad if somebody could give me a hint what the reason for that could be.


auto audioDeviceNode = _audioDeviceManager.createStateXml();

as createStateXml nows return a std::unique_ptrjuce::XmlElement

1 Like

Yeah! Thank you so much for the fast response!!