1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14: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

@ -130,7 +130,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
goUpButton->addListener (this);
goUpButton->setTooltip (TRANS ("go up to parent directory"));
if (previewComp != 0)
if (previewComp != nullptr)
addAndMakeVisible (previewComp);
setRoot (currentRoot);
@ -140,8 +140,8 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
FileBrowserComponent::~FileBrowserComponent()
{
fileListComponent = 0;
fileList = 0;
fileListComponent = nullptr;
fileList = nullptr;
thread.stopThread (10000);
}
@ -157,12 +157,12 @@ void FileBrowserComponent::removeListener (FileBrowserListener* const listener)
}
//==============================================================================
bool FileBrowserComponent::isSaveMode() const throw()
bool FileBrowserComponent::isSaveMode() const noexcept
{
return (flags & saveMode) != 0;
}
int FileBrowserComponent::getNumSelectedFiles() const throw()
int FileBrowserComponent::getNumSelectedFiles() const noexcept
{
if (chosenFiles.size() == 0 && currentFileIsValid())
return 1;
@ -170,7 +170,7 @@ int FileBrowserComponent::getNumSelectedFiles() const throw()
return chosenFiles.size();
}
const File FileBrowserComponent::getSelectedFile (int index) const throw()
const File FileBrowserComponent::getSelectedFile (int index) const noexcept
{
if ((flags & canSelectDirectories) != 0 && filenameBox.getText().isEmpty())
return currentRoot;
@ -189,7 +189,7 @@ bool FileBrowserComponent::currentFileIsValid() const
return getSelectedFile (0).exists();
}
const File FileBrowserComponent::getHighlightedFile() const throw()
const File FileBrowserComponent::getHighlightedFile() const noexcept
{
return fileListComponent->getSelectedFile (0);
}
@ -202,7 +202,7 @@ void FileBrowserComponent::deselectAllFiles()
//==============================================================================
bool FileBrowserComponent::isFileSuitable (const File& file) const
{
return (flags & canSelectFiles) != 0 && (fileFilter == 0 || fileFilter->isFileSuitable (file));
return (flags & canSelectFiles) != 0 && (fileFilter == nullptr || fileFilter->isFileSuitable (file));
}
bool FileBrowserComponent::isDirectorySuitable (const File&) const
@ -214,10 +214,10 @@ bool FileBrowserComponent::isFileOrDirSuitable (const File& f) const
{
if (f.isDirectory())
return (flags & canSelectDirectories) != 0
&& (fileFilter == 0 || fileFilter->isDirectorySuitable (f));
&& (fileFilter == nullptr || fileFilter->isDirectorySuitable (f));
return (flags & canSelectFiles) != 0 && f.exists()
&& (fileFilter == 0 || fileFilter->isFileSuitable (f));
&& (fileFilter == nullptr || fileFilter->isFileSuitable (f));
}
//==============================================================================
@ -295,7 +295,7 @@ const String FileBrowserComponent::getActionVerb() const
return isSaveMode() ? TRANS("Save") : TRANS("Open");
}
FilePreviewComponent* FileBrowserComponent::getPreviewComponent() const throw()
FilePreviewComponent* FileBrowserComponent::getPreviewComponent() const noexcept
{
return previewComp;
}
@ -313,7 +313,7 @@ void FileBrowserComponent::sendListenerChangeMessage()
{
Component::BailOutChecker checker (this);
if (previewComp != 0)
if (previewComp != nullptr)
previewComp->selectedFileChanged (getSelectedFile (0));
// You shouldn't delete the browser when the file gets changed!