mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: a few minor optimisations.
This commit is contained in:
parent
9d973f0089
commit
105929d39f
5 changed files with 12 additions and 7 deletions
|
|
@ -865,7 +865,7 @@ private:
|
|||
public:
|
||||
static int compareElements (const ValueTree* first, const ValueTree* second)
|
||||
{
|
||||
return first->getType().toString().compare (second->getType().toString());
|
||||
return first->getType().getCharPointer().compare (second->getType().getCharPointer());
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -95,9 +95,7 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const Str
|
|||
|
||||
ProjectExporter* ProjectExporter::createExporter (Project& project, const ValueTree& settings)
|
||||
{
|
||||
ProjectExporter* exp = nullptr;
|
||||
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2005::createForSettings (project, settings);
|
||||
ProjectExporter* exp = MSVCProjectExporterVC2005::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2008::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = MSVCProjectExporterVC2010::createForSettings (project, settings);
|
||||
if (exp == nullptr) exp = XCodeProjectExporter ::createForSettings (project, settings);
|
||||
|
|
|
|||
|
|
@ -584,8 +584,10 @@ void LibraryModule::findWildcardMatches (const File& localModuleFolder, const St
|
|||
FileSorter sorter;
|
||||
|
||||
DirectoryIterator iter (localModuleFolder.getChildFile (path), false, wildCard);
|
||||
while (iter.next())
|
||||
if (! iter.getFile().isHidden())
|
||||
bool isHiddenFile;
|
||||
|
||||
while (iter.next (nullptr, &isHiddenFile, nullptr, nullptr, nullptr, nullptr))
|
||||
if (! isHiddenFile)
|
||||
tempList.addSorted (sorter, iter.getFile());
|
||||
|
||||
result.addArray (tempList);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,9 @@ private:
|
|||
|
||||
File getFakeFile() const
|
||||
{
|
||||
return File::getCurrentWorkingDirectory().getChildFile (path);
|
||||
// This method gets called very often, so we'll cache this directory.
|
||||
static const File currentWorkingDirectory (File::getCurrentWorkingDirectory());
|
||||
return currentWorkingDirectory.getChildFile (path);
|
||||
}
|
||||
|
||||
static bool isAbsolute (const String& path)
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ public:
|
|||
/** Returns this identifier's raw string pointer. */
|
||||
operator const String::CharPointerType() const noexcept { return name; }
|
||||
|
||||
/** Returns this identifier's raw string pointer. */
|
||||
const String::CharPointerType getCharPointer() const noexcept { return name; }
|
||||
|
||||
/** Checks a given string for characters that might not be valid in an Identifier.
|
||||
Since Identifiers are used as a script variables and XML attributes, they should only contain
|
||||
alphanumeric characters, underscores, or the '-' and ':' characters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue