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

Fixed some errors in the examples

This commit is contained in:
ed 2020-03-16 11:24:39 +00:00
parent 69d5f16be0
commit 7035a40879
7 changed files with 13 additions and 25 deletions

View file

@ -395,11 +395,8 @@ public:
setInterceptsMouseClicks (! hasBeenPurchased, ! hasBeenPurchased);
if (auto* assetStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8()))
{
std::unique_ptr<InputStream> fileStream (assetStream);
if (auto fileStream = createAssetInputStream (String ("Purchases/" + String (imageResourceName)).toRawUTF8()))
avatar = PNGImageFormat().decodeImage (*fileStream);
}
}
}
private:
@ -569,10 +566,8 @@ private:
{
auto assetName = "Purchases/" + soundNames[idx] + String (phraseListBox.getSelectedRow()) + ".ogg";
if (auto* assetStream = createAssetInputStream (assetName.toRawUTF8()))
if (auto fileStream = createAssetInputStream (assetName.toRawUTF8()))
{
std::unique_ptr<InputStream> fileStream (assetStream);
currentPhraseData.reset();
fileStream->readIntoMemoryBlock (currentPhraseData);