mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Demos: Convey proper ownership semantics
This commit is contained in:
parent
4abffb1f11
commit
5af01b9b16
20 changed files with 77 additions and 76 deletions
|
|
@ -74,11 +74,11 @@ inline File getExamplesDirectory() noexcept
|
|||
#endif
|
||||
}
|
||||
|
||||
inline InputStream* createAssetInputStream (const char* resourcePath)
|
||||
inline std::unique_ptr<InputStream> createAssetInputStream (const char* resourcePath)
|
||||
{
|
||||
#if JUCE_ANDROID
|
||||
ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile));
|
||||
return apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath)));
|
||||
return std::unique_ptr<InputStream> (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))));
|
||||
#else
|
||||
#if JUCE_IOS
|
||||
auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue