diff --git a/extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp b/extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp index d2f068f5b0..57b36e194c 100644 --- a/extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp +++ b/extras/Introjucer/Source/Application/jucer_JuceUpdater.cpp @@ -80,14 +80,14 @@ void JuceUpdater::paint (Graphics& g) g.fillAll (Colours::white); } -const String findVersionNum (const String& file, const String& token) +String findVersionNum (const String& file, const String& token) { return file.fromFirstOccurrenceOf (token, false, false) .upToFirstOccurrenceOf ("\n", false, false) .trim(); } -const String JuceUpdater::getCurrentVersion() +String JuceUpdater::getCurrentVersion() { const String header (filenameComp.getCurrentFile() .getChildFile ("src/core/juce_StandardHeader.h").loadFileAsString()); diff --git a/extras/Introjucer/Source/Application/jucer_JuceUpdater.h b/extras/Introjucer/Source/Application/jucer_JuceUpdater.h index 47aabe952a..b57083cebb 100644 --- a/extras/Introjucer/Source/Application/jucer_JuceUpdater.h +++ b/extras/Introjucer/Source/Application/jucer_JuceUpdater.h @@ -56,7 +56,7 @@ private: ListBox availableVersionsList; XmlElement* downloadVersionList(); - const String getCurrentVersion(); + String getCurrentVersion(); bool isAlreadyUpToDate(); struct VersionInfo diff --git a/extras/Introjucer/Source/Application/jucer_MainWindow.h b/extras/Introjucer/Source/Application/jucer_MainWindow.h index 4dbd74c768..0893d58c2a 100644 --- a/extras/Introjucer/Source/Application/jucer_MainWindow.h +++ b/extras/Introjucer/Source/Application/jucer_MainWindow.h @@ -74,7 +74,7 @@ public: private: ScopedPointer currentProject; - const String getProjectWindowPosName() const + String getProjectWindowPosName() const { jassert (currentProject != nullptr); if (currentProject == nullptr) diff --git a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp index 18469a0d85..44718051b4 100644 --- a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp +++ b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp @@ -60,8 +60,8 @@ public: bool isForFile (const File& file) const { return modDetector.getFile() == file; } bool isForNode (const ValueTree& node) const { return false; } bool refersToProject (Project& project) const { return false; } - const String getName() const { return modDetector.getFile().getFileName(); } - const String getType() const { return modDetector.getFile().getFileExtension() + " file"; } + String getName() const { return modDetector.getFile().getFileName(); } + String getType() const { return modDetector.getFile().getFileExtension() + " file"; } bool needsSaving() const { return codeDoc != nullptr && codeDoc->hasChangedSinceSavePoint(); } bool hasFileBeenModifiedExternally() { return modDetector.hasBeenModified(); } void fileHasBeenRenamed (const File& newFile) { modDetector.fileHasBeenRenamed (newFile); } @@ -142,12 +142,12 @@ public: bool save() { return true; } bool hasFileBeenModifiedExternally() { return fileModificationTime != file.getLastModificationTime(); } void reloadFromFile() { fileModificationTime = file.getLastModificationTime(); } - const String getName() const { return file.getFileName(); } + String getName() const { return file.getFileName(); } Component* createEditor() { return new ItemPreviewComponent (file); } Component* createViewer() { return createEditor(); } void fileHasBeenRenamed (const File& newFile) { file = newFile; } - const String getType() const + String getType() const { if (file.getFileExtension().isNotEmpty()) return file.getFileExtension() + " file"; diff --git a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h index 38b9d41079..297b2dbbc0 100644 --- a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h +++ b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h @@ -52,8 +52,8 @@ public: virtual bool isForFile (const File& file) const = 0; virtual bool isForNode (const ValueTree& node) const = 0; virtual bool refersToProject (Project& project) const = 0; - virtual const String getName() const = 0; - virtual const String getType() const = 0; + virtual String getName() const = 0; + virtual String getType() const = 0; virtual bool needsSaving() const = 0; virtual bool save() = 0; virtual bool hasFileBeenModifiedExternally() = 0; diff --git a/extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp b/extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp index b0b7109ad9..a921773f3c 100644 --- a/extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp +++ b/extras/Introjucer/Source/Project/jucer_NewFileWizard.cpp @@ -45,7 +45,7 @@ public: NewCppFileWizard() {} ~NewCppFileWizard() {} - const String getName() { return "CPP File"; } + String getName() { return "CPP File"; } void createNewFile (Project::Item parent) { @@ -75,7 +75,7 @@ public: NewHeaderFileWizard() {} ~NewHeaderFileWizard() {} - const String getName() { return "Header File"; } + String getName() { return "Header File"; } void createNewFile (Project::Item parent) { @@ -105,7 +105,7 @@ public: NewCppAndHeaderFileWizard() {} ~NewCppAndHeaderFileWizard() {} - const String getName() { return "CPP & Header File"; } + String getName() { return "CPP & Header File"; } void createNewFile (Project::Item parent) { @@ -127,8 +127,8 @@ void NewFileWizard::Type::showFailedToWriteMessage (const File& file) "Couldn't write to the file: " + file.getFullPathName()); } -const File NewFileWizard::Type::askUserToChooseNewFile (const String& suggestedFilename, const String& wildcard, - const Project::Item& projectGroupToAddTo) +File NewFileWizard::Type::askUserToChooseNewFile (const String& suggestedFilename, const String& wildcard, + const Project::Item& projectGroupToAddTo) { FileChooser fc ("Select File to Create", projectGroupToAddTo.determineGroupFolder() diff --git a/extras/Introjucer/Source/Project/jucer_NewFileWizard.h b/extras/Introjucer/Source/Project/jucer_NewFileWizard.h index 70aa031ffa..99239611c6 100644 --- a/extras/Introjucer/Source/Project/jucer_NewFileWizard.h +++ b/extras/Introjucer/Source/Project/jucer_NewFileWizard.h @@ -48,13 +48,13 @@ public: virtual ~Type() {} //============================================================================== - virtual const String getName() = 0; + virtual String getName() = 0; virtual void createNewFile (Project::Item projectGroupToAddTo) = 0; protected: //============================================================================== - const File askUserToChooseNewFile (const String& suggestedFilename, const String& wildcard, - const Project::Item& projectGroupToAddTo); + File askUserToChooseNewFile (const String& suggestedFilename, const String& wildcard, + const Project::Item& projectGroupToAddTo); static void showFailedToWriteMessage (const File& file); }; diff --git a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp index 14f60fb412..6637d1961c 100644 --- a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp +++ b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp @@ -33,8 +33,8 @@ public: GUIAppWizard() {} ~GUIAppWizard() {} - const String getName() { return "GUI Application"; } - const String getDescription() { return "Creates a standard application"; } + String getName() { return "GUI Application"; } + String getDescription() { return "Creates a standard application"; } void addItemsToAlertWindow (AlertWindow& aw) { @@ -45,7 +45,7 @@ public: aw.addComboBox ("files", StringArray (fileOptions), "Files to Auto-Generate"); } - const String processResultsFromAlertWindow (AlertWindow& aw) + String processResultsFromAlertWindow (AlertWindow& aw) { createMainCpp = createWindow = false; @@ -142,8 +142,8 @@ public: ConsoleAppWizard() {} ~ConsoleAppWizard() {} - const String getName() { return "Console Application"; } - const String getDescription() { return "Creates a command-line application with no GUI features"; } + String getName() { return "Console Application"; } + String getDescription() { return "Creates a command-line application with no GUI features"; } void addItemsToAlertWindow (AlertWindow& aw) { @@ -153,7 +153,7 @@ public: aw.addComboBox ("files", StringArray (fileOptions), "Files to Auto-Generate"); } - const String processResultsFromAlertWindow (AlertWindow& aw) + String processResultsFromAlertWindow (AlertWindow& aw) { createMainCpp = false; @@ -210,14 +210,14 @@ public: AudioPluginAppWizard() {} ~AudioPluginAppWizard() {} - const String getName() { return "Audio Plug-In"; } - const String getDescription() { return "Creates an audio plugin project"; } + String getName() { return "Audio Plug-In"; } + String getDescription() { return "Creates an audio plugin project"; } void addItemsToAlertWindow (AlertWindow& aw) { } - const String processResultsFromAlertWindow (AlertWindow& aw) + String processResultsFromAlertWindow (AlertWindow& aw) { return String::empty; } @@ -300,14 +300,14 @@ public: BrowserPluginAppWizard() {} ~BrowserPluginAppWizard() {} - const String getName() { return "Browser Plug-In"; } - const String getDescription() { return "Creates an audio plugin project"; } + String getName() { return "Browser Plug-In"; } + String getDescription() { return "Creates an audio plugin project"; } void addItemsToAlertWindow (AlertWindow& aw) { } - const String processResultsFromAlertWindow (AlertWindow& aw) + String processResultsFromAlertWindow (AlertWindow& aw) { return String::empty; } diff --git a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.h b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.h index 1388ea10bd..cfb2879d8c 100644 --- a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.h +++ b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.h @@ -44,11 +44,11 @@ public: static Project* runNewProjectWizard (Component* ownerWindow); //============================================================================== - virtual const String getName() = 0; - virtual const String getDescription() = 0; + virtual String getName() = 0; + virtual String getDescription() = 0; virtual void addItemsToAlertWindow (AlertWindow& aw) = 0; - virtual const String processResultsFromAlertWindow (AlertWindow& aw) = 0; + virtual String processResultsFromAlertWindow (AlertWindow& aw) = 0; virtual bool initialiseProject (Project& project) = 0; protected: @@ -61,7 +61,7 @@ protected: NewProjectWizard(); Project* runWizard (Component* ownerWindow); - const File getSourceFilesFolder() const { return projectFile.getSiblingFile ("Source"); } + File getSourceFilesFolder() const { return projectFile.getSiblingFile ("Source"); } }; diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 8cfcd76bd8..48ba7eec36 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -237,7 +237,7 @@ void Project::valueTreeParentChanged (ValueTree& tree) } //============================================================================== -const File Project::resolveFilename (String filename) const +File Project::resolveFilename (String filename) const { if (filename.isEmpty()) return File::nonexistent; @@ -251,7 +251,7 @@ const File Project::resolveFilename (String filename) const return getFile().getSiblingFile (filename); } -const String Project::getRelativePathForFile (const File& file) const +String Project::getRelativePathForFile (const File& file) const { String filename (file.getFullPathName()); @@ -300,7 +300,7 @@ const char* const Project::useAmalgamatedJuce = "amalg_big const char* const Project::useAmalgamatedJuceViaSingleTemplate = "amalg_template"; const char* const Project::useAmalgamatedJuceViaMultipleTemplates = "amalg_multi"; -const File Project::getLocalJuceFolder() +File Project::getLocalJuceFolder() { ScopedPointer exp (ProjectExporter::createPlatformDefaultExporter (*this)); @@ -429,7 +429,7 @@ void Project::createPropertyEditors (Array & props) props.getUnchecked(i)->setPreferredHeight (22); } -const Image Project::getBigIcon() +Image Project::getBigIcon() { Item icon (getMainGroup().findItemWithID (getBigIconImageItemID().toString())); @@ -439,7 +439,7 @@ const Image Project::getBigIcon() return Image(); } -const Image Project::getSmallIcon() +Image Project::getSmallIcon() { Item icon (getMainGroup().findItemWithID (getSmallIconImageItemID().toString())); @@ -449,7 +449,7 @@ const Image Project::getSmallIcon() return Image(); } -const Image Project::getBestIconForSize (int size, bool returnNullIfNothingBigEnough) +Image Project::getBestIconForSize (int size, bool returnNullIfNothingBigEnough) { Image im; @@ -486,7 +486,7 @@ const Image Project::getBestIconForSize (int size, bool returnNullIfNothingBigEn } -const StringPairArray Project::getPreprocessorDefs() const +StringPairArray Project::getPreprocessorDefs() const { return parsePreprocessorDefs (getProjectPreprocessorDefs().toString()); } @@ -555,8 +555,8 @@ Project::Item::~Item() { } -const String Project::Item::getID() const { return node [Ids::id_]; } -const String Project::Item::getImageFileID() const { return "id:" + getID(); } +String Project::Item::getID() const { return node [Ids::id_]; } +String Project::Item::getImageFileID() const { return "id:" + getID(); } bool Project::Item::isFile() const { return node.hasType (Tags::file); } bool Project::Item::isGroup() const { return node.hasType (Tags::group) || isMainGroup(); } @@ -618,7 +618,7 @@ Value Project::Item::getShouldAddToResourceValue() const return node.getPropertyAsValue (Ids::resource, getUndoManager()); } -const File Project::Item::getFile() const +File Project::Item::getFile() const { if (isFile()) return project->resolveFilename (node [Ids::file].toString()); @@ -668,7 +668,7 @@ Project::Item Project::Item::findItemForFile (const File& file) const return Item (*project, ValueTree::invalid); } -const File Project::Item::determineGroupFolder() const +File Project::Item::determineGroupFolder() const { jassert (isGroup()); File f; @@ -907,7 +907,7 @@ bool Project::hasConfigurationNamed (const String& name) const return false; } -const String Project::getUniqueConfigName (String name) const +String Project::getUniqueConfigName (String name) const { String nameRoot (name); while (CharacterFunctions::isDigit (nameRoot.getLastCharacter())) @@ -990,7 +990,7 @@ Project::BuildConfiguration::~BuildConfiguration() { } -const String Project::BuildConfiguration::getGCCOptimisationFlag() const +String Project::BuildConfiguration::getGCCOptimisationFlag() const { const int level = (int) getOptimisationLevel().getValue(); return String (level <= 1 ? "0" : (level == 2 ? "s" : "3")); @@ -1060,7 +1060,7 @@ void Project::BuildConfiguration::createPropertyEditors (Array setPreferredHeight (22); } -const StringPairArray Project::BuildConfiguration::getAllPreprocessorDefs() const +StringPairArray Project::BuildConfiguration::getAllPreprocessorDefs() const { return mergePreprocessorDefs (project->getPreprocessorDefs(), parsePreprocessorDefs (getBuildConfigPreprocessorDefs().toString())); @@ -1122,7 +1122,7 @@ void Project::createDefaultExporters() } //============================================================================== -const String Project::getFileTemplate (const String& templateName) +String Project::getFileTemplate (const String& templateName) { int dataSize; const char* data = BinaryData::getNamedResource (templateName.toUTF8(), dataSize); diff --git a/extras/Introjucer/Source/Project/jucer_Project.h b/extras/Introjucer/Source/Project/jucer_Project.h index 04430e1571..68fb391157 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.h +++ b/extras/Introjucer/Source/Project/jucer_Project.h @@ -51,13 +51,13 @@ public: //============================================================================== ValueTree getProjectRoot() const { return projectRoot; } Value getProjectName() { return getMainGroup().getName(); } - const String getProjectFilenameRoot() { return File::createLegalFileName (getDocumentTitle()); } - const String getProjectUID() const { return projectRoot [Ids::id_]; } + String getProjectFilenameRoot() { return File::createLegalFileName (getDocumentTitle()); } + String getProjectUID() const { return projectRoot [Ids::id_]; } //============================================================================== bool shouldBeAddedToBinaryResourcesByDefault (const File& file); - const File resolveFilename (String filename) const; - const String getRelativePathForFile (const File& file) const; + File resolveFilename (String filename) const; + String getRelativePathForFile (const File& file) const; //============================================================================== // Creates editors for the project settings @@ -92,7 +92,7 @@ public: static const char* const useAmalgamatedJuceViaMultipleTemplates; Value getJuceLinkageModeValue() const { return getProjectValue ("juceLinkage"); } - const String getJuceLinkageMode() const { return getJuceLinkageModeValue().toString(); } + String getJuceLinkageMode() const { return getJuceLinkageModeValue().toString(); } bool isUsingWrapperFiles() const { return isUsingFullyAmalgamatedFile() || isUsingSingleTemplateFile() || isUsingMultipleTemplateFiles(); } bool isUsingFullyAmalgamatedFile() const { return getJuceLinkageMode() == useAmalgamatedJuce; } @@ -103,13 +103,13 @@ public: Value getProjectValue (const Identifier& name) const { return projectRoot.getPropertyAsValue (name, getUndoManagerFor (projectRoot)); } Value getProjectPreprocessorDefs() const { return getProjectValue (Ids::defines); } - const StringPairArray getPreprocessorDefs() const; + StringPairArray getPreprocessorDefs() const; Value getBigIconImageItemID() const { return getProjectValue ("bigIcon"); } Value getSmallIconImageItemID() const { return getProjectValue ("smallIcon"); } - const Image getBigIcon(); - const Image getSmallIcon(); - const Image getBestIconForSize (int size, bool returnNullIfNothingBigEnough); + Image getBigIcon(); + Image getSmallIcon(); + Image getBestIconForSize (int size, bool returnNullIfNothingBigEnough); Value shouldBuildVST() const { return getProjectValue ("buildVST"); } Value shouldBuildRTAS() const { return getProjectValue ("buildRTAS"); } @@ -133,21 +133,21 @@ public: Value getPluginRTASCategory() const { return getProjectValue ("pluginRTASCategory"); } //============================================================================== - const File getAppIncludeFile() const { return getWrapperFolder().getChildFile (getJuceSourceHFilename()); } - const File getWrapperFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); } - const File getPluginCharacteristicsFile() const { return getWrapperFolder().getChildFile (getPluginCharacteristicsFilename()); } + File getAppIncludeFile() const { return getWrapperFolder().getChildFile (getJuceSourceHFilename()); } + File getWrapperFolder() const { return getFile().getSiblingFile ("JuceLibraryCode"); } + File getPluginCharacteristicsFile() const { return getWrapperFolder().getChildFile (getPluginCharacteristicsFilename()); } //============================================================================== - const String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; } - const String getAmalgamatedMMFileName() const { return "juce_amalgamated.mm"; } - const String getAmalgamatedCppFileName() const { return "juce_amalgamated.cpp"; } + String getAmalgamatedHeaderFileName() const { return "juce_amalgamated.h"; } + String getAmalgamatedMMFileName() const { return "juce_amalgamated.mm"; } + String getAmalgamatedCppFileName() const { return "juce_amalgamated.cpp"; } - const String getAppConfigFilename() const { return "AppConfig.h"; } - const String getJuceSourceFilenameRoot() const { return "JuceLibraryCode"; } - int getNumSeparateAmalgamatedFiles() const { return 4; } - const String getJuceSourceHFilename() const { return "JuceHeader.h"; } - const String getJuceCodeGroupName() const { return "Juce Library Code"; } - const String getPluginCharacteristicsFilename() const { return "JucePluginCharacteristics.h"; } + String getAppConfigFilename() const { return "AppConfig.h"; } + String getJuceSourceFilenameRoot() const { return "JuceLibraryCode"; } + int getNumSeparateAmalgamatedFiles() const { return 4; } + String getJuceSourceHFilename() const { return "JuceHeader.h"; } + String getJuceCodeGroupName() const { return "Juce Library Code"; } + String getPluginCharacteristicsFilename() const { return "JucePluginCharacteristics.h"; } //============================================================================== class Item @@ -175,15 +175,15 @@ public: bool isMainGroup() const; bool isImageFile() const; - const String getID() const; + String getID() const; Item findItemWithID (const String& targetId) const; // (recursive search) - const String getImageFileID() const; + String getImageFileID() const; //============================================================================== Value getName() const; - const File getFile() const; + File getFile() const; void setFile (const File& file); - const File determineGroupFolder() const; + File determineGroupFolder() const; bool renameFile (const File& newFile); bool shouldBeAddedToTargetProject() const; @@ -240,9 +240,9 @@ public: // the path relative to the build folder in which the binary should go Value getTargetBinaryRelativePath() const { return getValue (Ids::binaryPath); } Value getOptimisationLevel() const { return getValue (Ids::optimisation); } - const String getGCCOptimisationFlag() const; + String getGCCOptimisationFlag() const; Value getBuildConfigPreprocessorDefs() const { return getValue (Ids::defines); } - const StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions + StringPairArray getAllPreprocessorDefs() const; // includes inherited definitions Value getHeaderSearchPath() const { return getValue (Ids::headerPath); } const StringArray getHeaderSearchPaths() const; @@ -277,7 +277,7 @@ public: void addNewConfiguration (BuildConfiguration* configToCopy); void deleteConfiguration (int index); bool hasConfigurationNamed (const String& name) const; - const String getUniqueConfigName (String name) const; + String getUniqueConfigName (String name) const; //============================================================================== ValueTree getExporters(); @@ -302,7 +302,7 @@ public: Value getJuceConfigFlag (const String& name); //============================================================================== - const String getFileTemplate (const String& templateName); + String getFileTemplate (const String& templateName); //============================================================================== void valueTreePropertyChanged (ValueTree& tree, const Identifier& property); @@ -325,7 +325,7 @@ private: static File lastDocumentOpened; DrawableImage mainProjectIcon; - const File getLocalJuceFolder(); + File getLocalJuceFolder(); void updateProjectSettings(); void setMissingDefaultValues(); ValueTree getConfigurations() const; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h index 115457a5a3..2e7b2f783d 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExport_Android.h @@ -246,7 +246,7 @@ private: << "include $(BUILD_SHARED_LIBRARY)" << newLine; } - const String createCPPFlags (bool forDebug) + String createCPPFlags (bool forDebug) { String flags ("-fsigned-char -fexceptions -frtti"); diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h index 8bf076a257..17de65a91d 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h @@ -79,7 +79,7 @@ protected: File rcFile, iconFile; bool hasIcon; - const File getProjectFile (const String& extension) const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (extension); } + File getProjectFile (const String& extension) const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (extension); } Value getLibraryType() const { return getSetting (Ids::libraryType); } bool isLibraryDLL() const { return project.isLibrary() && getLibraryType() == 2; } @@ -105,12 +105,12 @@ protected: return s; } - const String getIntermediatesPath (const Project::BuildConfiguration& config) const + String getIntermediatesPath (const Project::BuildConfiguration& config) const { return ".\\" + File::createLegalFileName (config.getName().toString().trim()); } - const String getConfigTargetPath (const Project::BuildConfiguration& config) const + String getConfigTargetPath (const Project::BuildConfiguration& config) const { const String binaryPath (config.getTargetBinaryRelativePath().toString().trim()); if (binaryPath.isEmpty()) @@ -121,7 +121,7 @@ protected: .toWindowsStyle(); } - const String getTargetBinarySuffix() const + String getTargetBinarySuffix() const { if (project.isLibrary()) return ".lib"; @@ -133,7 +133,7 @@ protected: return ".exe"; } - const String getPreprocessorDefs (const Project::BuildConfiguration& config, const String& joinString) const + String getPreprocessorDefs (const Project::BuildConfiguration& config, const String& joinString) const { StringPairArray defines; defines.set ("WIN32", ""); @@ -225,7 +225,7 @@ protected: return searchPaths; } - const String getBinaryFileForConfig (const Project::BuildConfiguration& config) const + String getBinaryFileForConfig (const Project::BuildConfiguration& config) const { const String targetBinary (getSetting (config.isDebug().getValue() ? Ids::libraryName_Debug : Ids::libraryName_Release).toString().trim()); if (targetBinary.isNotEmpty()) @@ -234,7 +234,7 @@ protected: return config.getTargetBinaryName().toString() + getTargetBinarySuffix(); } - static const String createConfigName (const Project::BuildConfiguration& config) + static String createConfigName (const Project::BuildConfiguration& config) { return config.getName().toString() + "|Win32"; } @@ -474,11 +474,11 @@ public: } protected: - virtual const String getProjectVersionString() const { return "9.00"; } - virtual const String getSolutionVersionString() const { return "10.00" + newLine + "# Visual C++ Express 2008"; } + virtual String getProjectVersionString() const { return "9.00"; } + virtual String getSolutionVersionString() const { return "10.00" + newLine + "# Visual C++ Express 2008"; } - const File getVCProjFile() const { return getProjectFile (".vcproj"); } - const File getSLNFile() const { return getProjectFile (".sln"); } + File getVCProjFile() const { return getProjectFile (".vcproj"); } + File getSLNFile() const { return getProjectFile (".sln"); } //============================================================================== void fillInProjectXml (XmlElement& projectXml) @@ -803,8 +803,8 @@ public: } protected: - const String getProjectVersionString() const { return "8.00"; } - const String getSolutionVersionString() const { return "8.00" + newLine + "# Visual C++ Express 2005"; } + String getProjectVersionString() const { return "8.00"; } + String getSolutionVersionString() const { return "8.00" + newLine + "# Visual C++ Express 2005"; } JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterVC2005); }; @@ -860,11 +860,11 @@ public: } private: - const File getDSPFile() const { return getProjectFile (".dsp"); } - const File getDSWFile() const { return getProjectFile (".dsw"); } + File getDSPFile() const { return getProjectFile (".dsp"); } + File getDSWFile() const { return getProjectFile (".dsw"); } //============================================================================== - const String createConfigName (const Project::BuildConfiguration& config) const + String createConfigName (const Project::BuildConfiguration& config) const { return project.getProjectName().toString() + " - Win32 " + config.getName().toString(); } @@ -1138,11 +1138,11 @@ public: } protected: - const File getVCProjFile() const { return getProjectFile (".vcxproj"); } - const File getVCProjFiltersFile() const { return getProjectFile (".vcxproj.filters"); } - const File getSLNFile() const { return getProjectFile (".sln"); } + File getVCProjFile() const { return getProjectFile (".vcxproj"); } + File getVCProjFiltersFile() const { return getProjectFile (".vcxproj.filters"); } + File getSLNFile() const { return getProjectFile (".sln"); } - static const String createConfigName (const Project::BuildConfiguration& config) + static String createConfigName (const Project::BuildConfiguration& config) { return config.getName().toString() + "|Win32"; } @@ -1367,7 +1367,7 @@ protected: } } - const String getProjectType() const + String getProjectType() const { if (project.isGUIApplication() || project.isCommandLineApp()) return "Application"; else if (project.isAudioPlugin() || project.isBrowserPlugin()) return "DynamicLibrary"; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h b/extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h index 72431069d2..644788a776 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExport_Make.h @@ -320,7 +320,7 @@ private: out << "-include $(OBJECTS:%.o=%.d)" << newLine; } - const String getObjectFileFor (const RelativePath& file) const + String getObjectFileFor (const RelativePath& file) const { return file.getFileNameWithoutExtension() + "_" + String::toHexString (file.toUnixStyle().hashCode()) + ".o"; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h index 080f1ca8c7..c0749d90df 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExport_XCode.h @@ -153,7 +153,7 @@ private: int64 projectIDSalt; const bool iPhone; - static const String sanitisePath (const String& path) + static String sanitisePath (const String& path) { if (path.startsWithChar ('~')) return "$(HOME)" + path.substring (1); @@ -161,10 +161,10 @@ private: return path; } - const File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); } + File getProjectBundle() const { return getTargetFolder().getChildFile (project.getProjectFilenameRoot()).withFileExtension (".xcodeproj"); } - bool hasPList() const { return ! (project.isLibrary() || project.isCommandLineApp()); } - const String getAudioPluginBundleExtension() const { return "component"; } + bool hasPList() const { return ! (project.isLibrary() || project.isCommandLineApp()); } + String getAudioPluginBundleExtension() const { return "component"; } //============================================================================== void createObjects() @@ -227,7 +227,7 @@ private: addProjectObject(); } - static const Image fixMacIconImageSize (Image& image) + static Image fixMacIconImageSize (Image& image) { const int w = image.getWidth(); const int h = image.getHeight(); @@ -760,7 +760,7 @@ private: xml->createNewChildElement (value ? "true" : "false"); } - const String addBuildFile (const RelativePath& path, const String& fileRefID, bool addToSourceBuildPhase, bool inhibitWarnings) + String addBuildFile (const RelativePath& path, const String& fileRefID, bool addToSourceBuildPhase, bool inhibitWarnings) { String fileID (createID (path.toUnixStyle() + "buildref")); @@ -778,7 +778,7 @@ private: return fileID; } - const String addBuildFile (const RelativePath& path, bool addToSourceBuildPhase, bool inhibitWarnings) + String addBuildFile (const RelativePath& path, bool addToSourceBuildPhase, bool inhibitWarnings) { return addBuildFile (path, createID (path), addToSourceBuildPhase, inhibitWarnings); } @@ -794,7 +794,7 @@ private: pbxFileReferences.add (v); } - const String addFileReference (const RelativePath& path) + String addFileReference (const RelativePath& path) { const String fileRefID (createID (path)); @@ -805,7 +805,7 @@ private: return fileRefID; } - static const String getFileType (const RelativePath& file) + static String getFileType (const RelativePath& file) { if (file.hasFileExtension ("cpp;cc;cxx")) return "sourcecode.cpp.cpp"; else if (file.hasFileExtension (".mm")) return "sourcecode.cpp.objcpp"; @@ -825,7 +825,7 @@ private: return "file" + file.getFileExtension(); } - const String addFile (const RelativePath& path, bool shouldBeCompiled, bool inhibitWarnings) + String addFile (const RelativePath& path, bool shouldBeCompiled, bool inhibitWarnings) { if (shouldBeCompiled) addBuildFile (path, true, inhibitWarnings); @@ -835,7 +835,7 @@ private: return addFileReference (path); } - const String addProjectItem (const Project::Item& projectItem) + String addProjectItem (const Project::Item& projectItem) { if (projectItem.isGroup()) { @@ -881,7 +881,7 @@ private: groups.add (v); } - const String createGroup (const Array& files, const String& groupName, const String& groupIDName, bool inhibitWarnings) + String createGroup (const Array& files, const String& groupName, const String& groupIDName, bool inhibitWarnings) { StringArray fileIDs; @@ -896,7 +896,7 @@ private: return groupID; } - const String addGroup (const Project::Item& item, StringArray& childIDs) + String addGroup (const Project::Item& item, StringArray& childIDs) { String groupName (item.getName().toString()); @@ -1068,7 +1068,7 @@ private: } //============================================================================== - static const String indentList (const StringArray& list, const String& separator) + static String indentList (const StringArray& list, const String& separator) { if (list.size() == 0) return " "; @@ -1077,12 +1077,12 @@ private: + (separator == ";" ? separator : String::empty); } - const String createID (const RelativePath& path) const + String createID (const RelativePath& path) const { return createID (path.toUnixStyle()); } - const String createID (const String& rootString) const + String createID (const String& rootString) const { static const char digits[] = "0123456789ABCDEF"; char n[24]; @@ -1094,7 +1094,7 @@ private: return String (n, numElementsInArray (n)); } - const String getIDForGroup (const Project::Item& item) const + String getIDForGroup (const Project::Item& item) const { return createID (item.getID()); } @@ -1125,7 +1125,7 @@ private: return s; } - const String createAUWrappersGroup() + String createAUWrappersGroup() { Array auWrappers; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp b/extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp index 28514e22a1..f34ea03a9b 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectExporter.cpp @@ -123,12 +123,12 @@ ProjectExporter* ProjectExporter::createPlatformDefaultExporter (Project& projec return best.release(); } -const File ProjectExporter::getTargetFolder() const +File ProjectExporter::getTargetFolder() const { return project.resolveFilename (getTargetLocation().toString()); } -const String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const +String ProjectExporter::getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const { String juceFolderPath (getJuceFolder().toString()); @@ -212,7 +212,7 @@ const Array ProjectExporter::getVSTFilesRequired() const return s; } -const StringPairArray ProjectExporter::getAllPreprocessorDefs (const Project::BuildConfiguration& config) const +StringPairArray ProjectExporter::getAllPreprocessorDefs (const Project::BuildConfiguration& config) const { StringPairArray defs (mergePreprocessorDefs (config.getAllPreprocessorDefs(), parsePreprocessorDefs (getExporterPreprocessorDefs().toString()))); @@ -220,7 +220,7 @@ const StringPairArray ProjectExporter::getAllPreprocessorDefs (const Project::Bu return defs; } -const StringPairArray ProjectExporter::getAllPreprocessorDefs() const +StringPairArray ProjectExporter::getAllPreprocessorDefs() const { StringPairArray defs (mergePreprocessorDefs (project.getPreprocessorDefs(), parsePreprocessorDefs (getExporterPreprocessorDefs().toString()))); @@ -228,7 +228,7 @@ const StringPairArray ProjectExporter::getAllPreprocessorDefs() const return defs; } -const String ProjectExporter::replacePreprocessorTokens (const Project::BuildConfiguration& config, const String& sourceString) const +String ProjectExporter::replacePreprocessorTokens (const Project::BuildConfiguration& config, const String& sourceString) const { return replacePreprocessorDefs (getAllPreprocessorDefs (config), sourceString); } diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExporter.h b/extras/Introjucer/Source/Project/jucer_ProjectExporter.h index 009401ee04..f3d903a229 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExporter.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExporter.h @@ -58,8 +58,8 @@ public: virtual bool shouldFileBeCompiledByDefault (const RelativePath& path) const; //============================================================================== - const String getName() const { return name; } - const File getTargetFolder() const; + String getName() const { return name; } + File getTargetFolder() const; const ValueTree& getSettings() const { return settings; } Value getSetting (const Identifier& name_) const { return settings.getPropertyAsValue (name_, project.getUndoManagerFor (settings)); } @@ -81,17 +81,17 @@ public: Value getExporterPreprocessorDefs() const { return getSetting (Ids::extraDefs); } // includes exporter, project + config defs - const StringPairArray getAllPreprocessorDefs (const Project::BuildConfiguration& config) const; + StringPairArray getAllPreprocessorDefs (const Project::BuildConfiguration& config) const; // includes exporter + project defs.. - const StringPairArray getAllPreprocessorDefs() const; + StringPairArray getAllPreprocessorDefs() const; - const String replacePreprocessorTokens (const Project::BuildConfiguration& config, - const String& sourceString) const; + String replacePreprocessorTokens (const Project::BuildConfiguration& config, + const String& sourceString) const; // This adds the quotes, and may return angle-brackets, eg: or normal quotes. - const String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; + String getIncludePathForFileInJuceFolder (const String& pathFromJuceFolder, const File& targetIncludeFile) const; - const String getExporterIdentifierMacro() const + String getExporterIdentifierMacro() const { return "JUCER_" + settings.getType().toString() + "_" + String::toHexString (settings [Ids::targetFolder].toString().hashCode()).toUpperCase(); @@ -122,11 +122,11 @@ protected: const RelativePath getJucePathFromTargetFolder() const; - static const String getDefaultBuildsRootFolder() { return "Builds/"; } + static String getDefaultBuildsRootFolder() { return "Builds/"; } const Array getVSTFilesRequired() const; - static const String getLibbedFilename (String name) + static String getLibbedFilename (String name) { if (! name.startsWith ("lib")) name = "lib" + name; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectSaver.h b/extras/Introjucer/Source/Project/jucer_ProjectSaver.h index d483b4de33..e1b3697e87 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectSaver.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectSaver.h @@ -531,7 +531,7 @@ private: } } - const File getSourceWrapperCpp (int fileIndex) const + File getSourceWrapperCpp (int fileIndex) const { return project.getWrapperFolder().getChildFile (project.getJuceSourceFilenameRoot() + (fileIndex != 0 ? String (fileIndex) : String::empty)) .withFileExtension (".cpp"); diff --git a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp index b1c35c7105..37ea93124b 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp @@ -40,7 +40,7 @@ ProjectTreeViewBase::~ProjectTreeViewBase() } //============================================================================== -const String ProjectTreeViewBase::getDisplayName() const +String ProjectTreeViewBase::getDisplayName() const { return item.getName().toString(); } @@ -54,7 +54,7 @@ void ProjectTreeViewBase::setName (const String& newName) } //============================================================================== -const File ProjectTreeViewBase::getFile() const +File ProjectTreeViewBase::getFile() const { return item.getFile(); } diff --git a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.h b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.h index 2a25e75171..2ede87df58 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.h @@ -49,11 +49,11 @@ public: virtual bool acceptsDragItems (const OwnedArray & selectedNodes) = 0; //============================================================================== - virtual const String getDisplayName() const; - virtual const String getRenamingName() const { return getDisplayName(); } + virtual String getDisplayName() const; + virtual String getRenamingName() const { return getDisplayName(); } virtual void setName (const String& newName); virtual bool isMissing() { return isFileMissing; } - virtual const File getFile() const; + virtual File getFile() const; virtual void deleteItem(); virtual void deleteAllSelectedItems(); diff --git a/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp b/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp index 89f5961ca3..0d5bdf4299 100644 --- a/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp +++ b/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp @@ -99,13 +99,13 @@ void ResourceFile::addFile (const File& file) variableNames.add (variableName); } -const String ResourceFile::getDataVariableFor (const File& file) const +String ResourceFile::getDataVariableFor (const File& file) const { jassert (files.indexOf (file) >= 0); return variableNames [files.indexOf (file)]; } -const String ResourceFile::getSizeVariableFor (const File& file) const +String ResourceFile::getSizeVariableFor (const File& file) const { jassert (files.indexOf (file) >= 0); return variableNames [files.indexOf (file)] + "Size"; diff --git a/extras/Introjucer/Source/Project/jucer_ResourceFile.h b/extras/Introjucer/Source/Project/jucer_ResourceFile.h index bc8776f2fe..97f7268e3e 100644 --- a/extras/Introjucer/Source/Project/jucer_ResourceFile.h +++ b/extras/Introjucer/Source/Project/jucer_ResourceFile.h @@ -45,11 +45,11 @@ public: void setJuceHeaderToInclude (const File& header); void setClassName (const String& className); - const String getClassName() const { return className; } + String getClassName() const { return className; } void addFile (const File& file); - const String getDataVariableFor (const File& file) const; - const String getSizeVariableFor (const File& file) const; + String getDataVariableFor (const File& file) const; + String getSizeVariableFor (const File& file) const; int getNumFiles() const { return files.size(); } int64 getTotalDataSize() const; diff --git a/extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp b/extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp index cae7ddfcbf..af05060a7f 100644 --- a/extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp +++ b/extras/Introjucer/Source/Project/jucer_TreeViewTypes.cpp @@ -164,12 +164,12 @@ SourceFileTreeViewItem::~SourceFileTreeViewItem() { } -const String SourceFileTreeViewItem::getDisplayName() const +String SourceFileTreeViewItem::getDisplayName() const { return getFile().getFileName(); } -static const File findCorrespondingHeaderOrCpp (const File& f) +static File findCorrespondingHeaderOrCpp (const File& f) { if (f.hasFileExtension (sourceFileExtensions)) return f.withFileExtension (".h"); diff --git a/extras/Introjucer/Source/Project/jucer_TreeViewTypes.h b/extras/Introjucer/Source/Project/jucer_TreeViewTypes.h index 35102fd973..829ea68dda 100644 --- a/extras/Introjucer/Source/Project/jucer_TreeViewTypes.h +++ b/extras/Introjucer/Source/Project/jucer_TreeViewTypes.h @@ -42,7 +42,7 @@ public: void createLeftEdgeComponents (Array& components) {} void showDocument(); void showPopupMenu(); - const String getDisplayName() const; + String getDisplayName() const; void setName (const String& newName); }; diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp index 7beaaf3290..d724d38374 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp @@ -30,7 +30,7 @@ //============================================================================== namespace CodeHelpers { - const String indent (const String& code, const int numSpaces, bool indentFirstLine) + String indent (const String& code, const int numSpaces, bool indentFirstLine) { if (numSpaces == 0) return code; @@ -52,7 +52,7 @@ namespace CodeHelpers return lines.joinIntoString (newLine); } - const String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates) + String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates) { if (s.isEmpty()) return "unknown"; @@ -166,19 +166,19 @@ namespace CodeHelpers } } - const String addEscapeChars (const String& s) + String addEscapeChars (const String& s) { MemoryOutputStream out; writeEscapeChars (out, s.toUTF8().getAddress(), -1, -1, false, true); return out.toUTF8(); } - const String createIncludeStatement (const File& includeFile, const File& targetFile) + String createIncludeStatement (const File& includeFile, const File& targetFile) { return "#include \"" + FileHelpers::unixStylePath (includeFile.getRelativePathFrom (targetFile.getParentDirectory())) + "\""; } - const String makeHeaderGuardName (const File& file) + String makeHeaderGuardName (const File& file) { return "__" + file.getFileName().toUpperCase() .replaceCharacters (" .", "__") @@ -186,7 +186,7 @@ namespace CodeHelpers + "_" + String::toHexString (file.hashCode()).toUpperCase() + "__"; } - const String makeBinaryDataIdentifierName (const File& file) + String makeBinaryDataIdentifierName (const File& file) { return makeValidIdentifier (file.getFileName() .replaceCharacters (" .", "__") @@ -194,7 +194,7 @@ namespace CodeHelpers false, true, false); } - const String stringLiteral (const String& text) + String stringLiteral (const String& text) { if (text.isEmpty()) return "String::empty"; @@ -205,17 +205,17 @@ namespace CodeHelpers return "CharPointer_UTF8 (" + CodeHelpers::addEscapeChars (text).quoted() + ")"; } - const String stringLiteralIfNotEmpty (const String& text) + String stringLiteralIfNotEmpty (const String& text) { return text.isNotEmpty() ? stringLiteral (text) : String::empty; } - const String boolLiteral (const bool b) + String boolLiteral (const bool b) { return b ? "true" : "false"; } - const String floatLiteral (float v) + String floatLiteral (float v) { String s ((double) v, 4); @@ -235,7 +235,7 @@ namespace CodeHelpers return s; } - const String doubleLiteral (double v) + String doubleLiteral (double v) { String s (v, 7); @@ -253,7 +253,7 @@ namespace CodeHelpers return s; } - const String alignFunctionCallParams (const String& call, const StringArray& parameters, const int maxLineLength) + String alignFunctionCallParams (const String& call, const StringArray& parameters, const int maxLineLength) { String result, currentLine (call); @@ -276,7 +276,7 @@ namespace CodeHelpers return result + currentLine.trimEnd() + ")"; } - const String colourToCode (const Colour& col) + String colourToCode (const Colour& col) { const Colour colours[] = { @@ -301,7 +301,7 @@ namespace CodeHelpers return "Colour (0x" + hexString8Digits ((int) col.getARGB()) + ')'; } - const String justificationToCode (const Justification& justification) + String justificationToCode (const Justification& justification) { switch (justification.getFlags()) { @@ -327,7 +327,7 @@ namespace CodeHelpers return "Justification (" + String (justification.getFlags()) + ")"; } - const String fontToCode (const Font& font) + String fontToCode (const Font& font) { String s ("Font ("); String name (font.getTypefaceName()); @@ -358,7 +358,7 @@ namespace CodeHelpers return s + ")"; } - const String castToFloat (const String& expression) + String castToFloat (const String& expression) { if (expression.containsOnly ("0123456789.f")) { @@ -373,7 +373,7 @@ namespace CodeHelpers return "(float) (" + expression + ")"; } - const String castToInt (const String& expression) + String castToInt (const String& expression) { if (expression.containsOnly ("0123456789.")) return String ((int) expression.getFloatValue()); diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h index 36e8615ca2..263cb06257 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h @@ -30,25 +30,25 @@ //============================================================================== namespace CodeHelpers { - const String indent (const String& code, const int numSpaces, bool indentFirstLine); - const String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates); - const String addEscapeChars (const String& text); - const String createIncludeStatement (const File& includeFile, const File& targetFile); - const String makeHeaderGuardName (const File& file); - const String makeBinaryDataIdentifierName (const File& file); + String indent (const String& code, const int numSpaces, bool indentFirstLine); + String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates); + String addEscapeChars (const String& text); + String createIncludeStatement (const File& includeFile, const File& targetFile); + String makeHeaderGuardName (const File& file); + String makeBinaryDataIdentifierName (const File& file); - const String stringLiteral (const String& text); - const String stringLiteralIfNotEmpty (const String& text); // if the string's empty, this returns an empty string - const String boolLiteral (bool b); - const String floatLiteral (float v); - const String doubleLiteral (double v); + String stringLiteral (const String& text); + String stringLiteralIfNotEmpty (const String& text); // if the string's empty, this returns an empty string + String boolLiteral (bool b); + String floatLiteral (float v); + String doubleLiteral (double v); - const String colourToCode (const Colour& col); - const String justificationToCode (const Justification& justification); - const String castToFloat (const String& expression); - const String castToInt (const String& expression); - const String fontToCode (const Font& font); - const String alignFunctionCallParams (const String& call, const StringArray& parameters, int maxLineLength); + String colourToCode (const Colour& col); + String justificationToCode (const Justification& justification); + String castToFloat (const String& expression); + String castToInt (const String& expression); + String fontToCode (const Font& font); + String alignFunctionCallParams (const String& call, const StringArray& parameters, int maxLineLength); void writeDataAsCppLiteral (const MemoryBlock& data, OutputStream& out); diff --git a/extras/Introjucer/Source/Utility/jucer_FileHelpers.cpp b/extras/Introjucer/Source/Utility/jucer_FileHelpers.cpp index 46d9a048ee..e8f8ba2bb0 100644 --- a/extras/Introjucer/Source/Utility/jucer_FileHelpers.cpp +++ b/extras/Introjucer/Source/Utility/jucer_FileHelpers.cpp @@ -80,17 +80,17 @@ namespace FileHelpers return false; } - const String unixStylePath (const String& path) + String unixStylePath (const String& path) { return path.replaceCharacter ('\\', '/'); } - const String windowsStylePath (const String& path) + String windowsStylePath (const String& path) { return path.replaceCharacter ('/', '\\'); } - const String appendPath (const String& path, const String& subpath) + String appendPath (const String& path, const String& subpath) { if (File::isAbsolutePath (subpath) || subpath.startsWithChar ('$') @@ -132,7 +132,7 @@ namespace FileHelpers && folder.getChildFile ("juce_Config.h").exists(); } - static const File lookInFolderForJuceFolder (const File& folder) + static File lookInFolderForJuceFolder (const File& folder) { for (DirectoryIterator di (folder, false, "*juce*", File::findDirectories); di.next();) { @@ -143,7 +143,7 @@ namespace FileHelpers return File::nonexistent; } - const File findParentJuceFolder (const File& file) + File findParentJuceFolder (const File& file) { File f (file); @@ -162,7 +162,7 @@ namespace FileHelpers return File::nonexistent; } - const File findDefaultJuceFolder() + File findDefaultJuceFolder() { File f = findParentJuceFolder (File::getSpecialLocation (File::currentApplicationFile)); diff --git a/extras/Introjucer/Source/Utility/jucer_FileHelpers.h b/extras/Introjucer/Source/Utility/jucer_FileHelpers.h index 6baa12f3c1..3f451d90a6 100644 --- a/extras/Introjucer/Source/Utility/jucer_FileHelpers.h +++ b/extras/Introjucer/Source/Utility/jucer_FileHelpers.h @@ -39,15 +39,15 @@ namespace FileHelpers bool containsAnyNonHiddenFiles (const File& folder); - const String unixStylePath (const String& path); - const String windowsStylePath (const String& path); + String unixStylePath (const String& path); + String windowsStylePath (const String& path); bool shouldPathsBeRelative (String path1, String path2); //============================================================================== bool isJuceFolder (const File& folder); - const File findParentJuceFolder (const File& file); - const File findDefaultJuceFolder(); + File findParentJuceFolder (const File& file); + File findDefaultJuceFolder(); } //============================================================================== diff --git a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h index fdd06701e2..c22214f462 100644 --- a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h +++ b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h @@ -49,8 +49,8 @@ public: void itemClicked (const MouseEvent& e); //============================================================================== - virtual const String getRenamingName() const = 0; - virtual const String getDisplayName() const = 0; + virtual String getRenamingName() const = 0; + virtual String getDisplayName() const = 0; virtual void setName (const String& newName) = 0; virtual bool isMissing() = 0; virtual const Drawable* getIcon() const = 0; diff --git a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp index 7b3756873c..7fa3ac6989 100644 --- a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp +++ b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp @@ -83,7 +83,7 @@ const String escapeSpaces (const String& s) } //============================================================================== -const StringPairArray parsePreprocessorDefs (const String& text) +StringPairArray parsePreprocessorDefs (const String& text) { StringPairArray result; String::CharPointerType s (text.getCharPointer()); @@ -126,7 +126,7 @@ const StringPairArray parsePreprocessorDefs (const String& text) return result; } -const StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs) +StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs) { for (int i = 0; i < overridingDefs.size(); ++i) inheritedDefs.set (overridingDefs.getAllKeys()[i], overridingDefs.getAllValues()[i]); diff --git a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h index 3621ce1336..4a10efd720 100644 --- a/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h +++ b/extras/Introjucer/Source/Utility/jucer_MiscUtilities.h @@ -35,8 +35,8 @@ const String createGUID (const String& seed); // Turns a seed into a windows GUI const String escapeSpaces (const String& text); // replaces spaces with blackslash-space -const StringPairArray parsePreprocessorDefs (const String& defs); -const StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs); +StringPairArray parsePreprocessorDefs (const String& defs); +StringPairArray mergePreprocessorDefs (StringPairArray inheritedDefs, const StringPairArray& overridingDefs); const String createGCCPreprocessorFlags (const StringPairArray& defs); const String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString); diff --git a/extras/Introjucer/Source/Utility/jucer_RelativePath.h b/extras/Introjucer/Source/Utility/jucer_RelativePath.h index a40481519e..f25272b1c7 100644 --- a/extras/Introjucer/Source/Utility/jucer_RelativePath.h +++ b/extras/Introjucer/Source/Utility/jucer_RelativePath.h @@ -59,13 +59,13 @@ public: RootFolder getRoot() const { return root; } - const String toUnixStyle() const { return FileHelpers::unixStylePath (path); } - const String toWindowsStyle() const { return FileHelpers::windowsStylePath (path); } + String toUnixStyle() const { return FileHelpers::unixStylePath (path); } + String toWindowsStyle() const { return FileHelpers::windowsStylePath (path); } - const String getFileName() const { return getFakeFile().getFileName(); } - const String getFileNameWithoutExtension() const { return getFakeFile().getFileNameWithoutExtension(); } + String getFileName() const { return getFakeFile().getFileName(); } + String getFileNameWithoutExtension() const { return getFakeFile().getFileNameWithoutExtension(); } - const String getFileExtension() const { return getFakeFile().getFileExtension(); } + String getFileExtension() const { return getFakeFile().getFileExtension(); } bool hasFileExtension (const String& extension) const { return getFakeFile().hasFileExtension (extension); } bool isAbsolute() const { return isAbsolute (path); } @@ -74,7 +74,7 @@ public: return RelativePath (path.upToLastOccurrenceOf (".", ! extension.startsWithChar ('.'), false) + extension, root); } - const RelativePath getParentDirectory() const + RelativePath getParentDirectory() const { String p (path); if (path.endsWithChar ('/')) @@ -83,7 +83,7 @@ public: return RelativePath (p.upToLastOccurrenceOf ("/", false, false), root); } - const RelativePath getChildFile (const String& subpath) const + RelativePath getChildFile (const String& subpath) const { if (isAbsolute (subpath)) return RelativePath (subpath, root); @@ -95,7 +95,7 @@ public: return RelativePath (p + subpath, root); } - const RelativePath rebased (const File& originalRoot, const File& newRoot, const RootFolder newRootType) const + RelativePath rebased (const File& originalRoot, const File& newRoot, const RootFolder newRootType) const { if (isAbsolute()) return RelativePath (path, newRootType); @@ -108,7 +108,7 @@ private: String path; RootFolder root; - const File getFakeFile() const + File getFakeFile() const { return File::getCurrentWorkingDirectory().getChildFile (path); } diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp index 6609953df1..90c5c18500 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp @@ -143,7 +143,7 @@ void StoredSettings::setLastProjects (const Array& files) props->setValue ("lastProjects", s.joinIntoString ("|")); } -const File StoredSettings::getLastKnownJuceFolder() const +File StoredSettings::getLastKnownJuceFolder() const { File defaultJuceFolder (FileHelpers::findDefaultJuceFolder()); File f (props->getValue ("lastJuceFolder", defaultJuceFolder.getFullPathName())); @@ -168,7 +168,7 @@ const StringArray& StoredSettings::getFontNames() return fontNames; } -const Image StoredSettings::getFallbackImage() +Image StoredSettings::getFallbackImage() { if (fallbackImage.isNull()) fallbackImage = ImageFileFormat::loadFrom (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize); diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h index ab5251fc53..0a1dcdc069 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h @@ -50,7 +50,7 @@ public: const Array getLastProjects() const; void setLastProjects (const Array& files); - const File getLastKnownJuceFolder() const; + File getLastKnownJuceFolder() const; void setLastKnownJuceFolder (const File& file); const StringArray& getFontNames(); @@ -70,7 +70,7 @@ public: //============================================================================== - const Image getFallbackImage(); + Image getFallbackImage(); const Drawable* getImageFileIcon();