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

Added fake placeholder versions of the new c++0x 'noexcept' and 'nullptr' keywords, and altered the library classes to use these instead of 'throw()' and '0'. This shouldn't make any difference at all to existing code, but will enable better static checking with future c++0x compilers.

This commit is contained in:
Julian Storer 2011-04-07 13:49:01 +01:00
parent e0a38a30db
commit f04309f44a
533 changed files with 13927 additions and 13931 deletions

View file

@ -48,7 +48,7 @@ bool ResourceFile::isResourceFile (const File& file)
{
ScopedPointer <InputStream> in (file.createInputStream());
if (in != 0)
if (in != nullptr)
{
MemoryBlock mb;
in->readIntoMemoryBlock (mb, 256);
@ -167,9 +167,9 @@ bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream&
const int64 dataSize = file.getSize();
ScopedPointer <InputStream> fileStream (file.createInputStream());
jassert (fileStream != 0);
jassert (fileStream != nullptr);
if (fileStream != 0)
if (fileStream != nullptr)
{
const String variableName (variableNames[i]);
const String tempVariable ("temp_" + String::toHexString (file.hashCode()));
@ -209,12 +209,12 @@ bool ResourceFile::write (const File& cppFile)
ScopedPointer <FileOutputStream> cppOut (tempCpp.getFile().createOutputStream (32768));
ScopedPointer <FileOutputStream> hppOut (tempH.getFile().createOutputStream (32768));
if (cppOut != 0 && hppOut != 0)
if (cppOut != nullptr && hppOut != nullptr)
{
if (write (cppFile, *cppOut, *hppOut))
{
cppOut = 0;
hppOut = 0;
cppOut = nullptr;
hppOut = nullptr;
return (tempCpp.getFile().hasIdenticalContentTo (tempCpp.getTargetFile()) || tempCpp.overwriteTargetFileWithTemporary())
&& (tempH.getFile().hasIdenticalContentTo (tempH.getTargetFile()) || tempH.overwriteTargetFileWithTemporary());