createInputStream behaviour change?

Hey there

After updating to the latest Dev branch commit (having been 120 commits behind) I’m finding that this:
InputStream* stream = inputURL.createInputStream (false);
where inputURL is an URL, now errors with:

No viable conversion from 'std::unique_ptr<InputStream>' to 'juce::InputStream *'

For ages this wasn’t a problem, and I don’t understand why it is now. Any thoughts or suggestions would be very much appreciated!

Cheers

Jeff

return type has been changed from InputStream* to std::unique_ptr<InputStream>
so you need to udpate your code accordingly

an easy way is
InputStream* stream = inputURL.createInputStream (false).release();

but it’s probably best to use the RAII possibility of the unique_ptr

1 Like

Hey @otristan
Much appreciate the reply. That actually makes sense now, even to me. Thanks for pointing (lol) that out :slight_smile: