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

Added some thread-safety to typeface caching, and optimised default font construction.

This commit is contained in:
jules 2013-09-24 13:37:00 +01:00
parent 62b3adee81
commit af87a2eda6
2 changed files with 56 additions and 78 deletions

View file

@ -202,13 +202,11 @@ bool PropertiesFile::loadAsXml()
return true;
}
else
{
// must be a pretty broken XML file we're trying to parse here,
// or a sign that this object needs an InterProcessLock,
// or just a failure reading the file. This last reason is why
// we don't jassertfalse here.
}
// must be a pretty broken XML file we're trying to parse here,
// or a sign that this object needs an InterProcessLock,
// or just a failure reading the file. This last reason is why
// we don't jassertfalse here.
}
return false;
@ -259,10 +257,9 @@ bool PropertiesFile::loadAsBinary()
GZIPDecompressorInputStream gzip (subStream);
return loadAsBinary (gzip);
}
else if (magicNumber == PropertyFileConstants::magicNumber)
{
if (magicNumber == PropertyFileConstants::magicNumber)
return loadAsBinary (fileStream);
}
}
return false;
@ -295,7 +292,7 @@ bool PropertiesFile::saveAsBinary()
return false; // locking failure..
TemporaryFile tempFile (file);
ScopedPointer <OutputStream> out (tempFile.getFile().createOutputStream());
ScopedPointer<OutputStream> out (tempFile.getFile().createOutputStream());
if (out != nullptr)
{