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

Another batch of ScopedPointer cleanups

This commit is contained in:
jules 2018-01-10 14:49:57 +00:00
parent 5b13063162
commit 48a5fbd333
74 changed files with 311 additions and 292 deletions

View file

@ -1170,8 +1170,7 @@ private:
{
const auto indexOfComma = link.indexOf (",");
auto format = link.substring (5, indexOfComma).trim();
const auto indexOfSemi = format.indexOf (";");
auto indexOfSemi = format.indexOf (";");
if (format.substring (indexOfSemi + 1).trim().equalsIgnoreCase ("base64"))
{
@ -1179,10 +1178,10 @@ private:
if (mime.equalsIgnoreCase ("image/png") || mime.equalsIgnoreCase ("image/jpeg"))
{
const String base64text = link.substring (indexOfComma + 1).removeCharacters ("\t\n\r ");
auto base64text = link.substring (indexOfComma + 1).removeCharacters ("\t\n\r ");
if (Base64::convertFromBase64 (imageStream, base64text))
inputStream = new MemoryInputStream (imageStream.getData(), imageStream.getDataSize(), false);
inputStream.reset (new MemoryInputStream (imageStream.getData(), imageStream.getDataSize(), false));
}
}
}
@ -1191,7 +1190,7 @@ private:
auto linkedFile = originalFile.getParentDirectory().getChildFile (link);
if (linkedFile.existsAsFile())
inputStream = linkedFile.createInputStream();
inputStream.reset (linkedFile.createInputStream());
}
if (inputStream != nullptr)