mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made a few constant string arrays static to help compilers to optimise their initialisation.
This commit is contained in:
parent
674c0704fe
commit
81435f8134
21 changed files with 170 additions and 171 deletions
|
|
@ -55,13 +55,13 @@ public:
|
|||
|
||||
if (file.hasFileExtension (sourceFileExtensions))
|
||||
{
|
||||
const char* extensions[] = { "h", "hpp", "hxx", "hh", nullptr };
|
||||
static const char* extensions[] = { "h", "hpp", "hxx", "hh", nullptr };
|
||||
return findCounterpart (file, extensions);
|
||||
}
|
||||
|
||||
if (file.hasFileExtension (headerFileExtensions))
|
||||
{
|
||||
const char* extensions[] = { "cpp", "mm", "cc", "cxx", "c", "m", nullptr };
|
||||
static const char* extensions[] = { "cpp", "mm", "cc", "cxx", "c", "m", nullptr };
|
||||
return findCounterpart (file, extensions);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ private:
|
|||
{
|
||||
XmlElement* const linker = xml.createNewChildElement ("Linker");
|
||||
|
||||
const char* defaultLibs[] = { "gdi32", "user32", "kernel32", "comctl32" };
|
||||
static const char* defaultLibs[] = { "gdi32", "user32", "kernel32", "comctl32" };
|
||||
|
||||
StringArray libs (defaultLibs, numElementsInArray (defaultLibs));
|
||||
libs.addTokens (getExternalLibrariesString(), ";\n", "\"'");
|
||||
|
|
|
|||
|
|
@ -180,14 +180,14 @@ protected:
|
|||
"you to use macros in this path, e.g. \"$(TEMP)\\MyAppBuildFiles\\$(Configuration)\", which is a handy way to "
|
||||
"send them to the user's temp folder.");
|
||||
|
||||
const char* const warningLevelNames[] = { "Low", "Medium", "High", nullptr };
|
||||
static const char* warningLevelNames[] = { "Low", "Medium", "High", nullptr };
|
||||
const int warningLevels[] = { 2, 3, 4 };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getWarningLevelValue(), "Warning Level",
|
||||
StringArray (warningLevelNames), Array<var> (warningLevels, numElementsInArray (warningLevels))));
|
||||
|
||||
{
|
||||
const char* const runtimeNames[] = { "(Default)", "Use static runtime", "Use DLL runtime", nullptr };
|
||||
static const char* runtimeNames[] = { "(Default)", "Use static runtime", "Use DLL runtime", nullptr };
|
||||
const var runtimeValues[] = { var(), var (false), var (true) };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getUsingRuntimeLibDLL(), "Runtime Library",
|
||||
|
|
@ -195,8 +195,8 @@ protected:
|
|||
}
|
||||
|
||||
{
|
||||
const char* const wpoNames[] = { "Enable link-time code generation when possible",
|
||||
"Always disable link-time code generation", nullptr };
|
||||
static const char* wpoNames[] = { "Enable link-time code generation when possible",
|
||||
"Always disable link-time code generation", nullptr };
|
||||
const var wpoValues[] = { var(), var (1) };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getWholeProgramOptValue(), "Whole Program Optimisation",
|
||||
|
|
@ -211,8 +211,8 @@ protected:
|
|||
props.add (new BooleanPropertyComponent (shouldGenerateManifestValue(), "Manifest", "Generate Manifest"));
|
||||
|
||||
{
|
||||
const char* const characterSetNames[] = { "Default", "MultiByte", "Unicode", nullptr };
|
||||
const var charSets[] = { var::null, "MultiByte", "Unicode", };
|
||||
static const char* characterSetNames[] = { "Default", "MultiByte", "Unicode", nullptr };
|
||||
const var charSets[] = { var::null, "MultiByte", "Unicode", };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getCharacterSetValue(), "Character Set",
|
||||
StringArray (characterSetNames), Array<var> (charSets, numElementsInArray (charSets))));
|
||||
|
|
@ -1526,8 +1526,8 @@ public:
|
|||
{
|
||||
MSVCProjectExporterVC2010::createExporterProperties (props);
|
||||
|
||||
const char* const toolsetNames[] = { "(default)", "v110", "v110_xp", "Windows7.1SDK", nullptr };
|
||||
const var toolsets[] = { var(), "v110", "v110_xp", "Windows7.1SDK" };
|
||||
static const char* toolsetNames[] = { "(default)", "v110", "v110_xp", "Windows7.1SDK", nullptr };
|
||||
const var toolsets[] = { var(), "v110", "v110_xp", "Windows7.1SDK" };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getPlatformToolsetValue(), "Platform Toolset",
|
||||
StringArray (toolsetNames),
|
||||
|
|
@ -1578,8 +1578,8 @@ public:
|
|||
{
|
||||
MSVCProjectExporterVC2010::createExporterProperties (props);
|
||||
|
||||
const char* const toolsetNames[] = { "(default)", "v120", "v120_xp", nullptr };
|
||||
const var toolsets[] = { var(), "v120", "v120_xp" };
|
||||
static const char* toolsetNames[] = { "(default)", "v120", "v120_xp", nullptr };
|
||||
const var toolsets[] = { var(), "v120", "v120_xp" };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getPlatformToolsetValue(), "Platform Toolset",
|
||||
StringArray (toolsetNames),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ protected:
|
|||
|
||||
void createConfigProperties (PropertyListBuilder& props) override
|
||||
{
|
||||
const char* const archNames[] = { "(Default)", "32-bit (-m32)", "64-bit (-m64)", "ARM v6", "ARM v7" };
|
||||
static const char* const archNames[] = { "(Default)", "32-bit (-m32)", "64-bit (-m64)", "ARM v6", "ARM v7" };
|
||||
const var archFlags[] = { var(), "-m32", "-m64", "-march=armv6", "-march=armv7" };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture",
|
||||
|
|
|
|||
|
|
@ -595,8 +595,8 @@ void ProjectExporter::BuildConfiguration::createPropertyEditors (PropertyListBui
|
|||
props.add (new BooleanPropertyComponent (isDebugValue(), "Debug mode", "Debugging enabled"),
|
||||
"If enabled, this means that the configuration should be built with debug synbols.");
|
||||
|
||||
const char* optimisationLevels[] = { "No optimisation", "Minimise size", "Maximise speed", 0 };
|
||||
const int optimisationLevelValues[] = { optimisationOff, optimiseMinSize, optimiseMaxSpeed, 0 };
|
||||
static const char* optimisationLevels[] = { "No optimisation", "Minimise size", "Maximise speed", 0 };
|
||||
const int optimisationLevelValues[] = { optimisationOff, optimiseMinSize, optimiseMaxSpeed, 0 };
|
||||
props.add (new ChoicePropertyComponent (getOptimisationLevel(), "Optimisation",
|
||||
StringArray (optimisationLevels), Array<var> (optimisationLevelValues)),
|
||||
"The optimisation level for this configuration");
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ private:
|
|||
|
||||
static bool shouldFileBeKept (const String& filename)
|
||||
{
|
||||
const char* filesToKeep[] = { ".svn", ".cvs", "CMakeLists.txt" };
|
||||
static const char* filesToKeep[] = { ".svn", ".cvs", "CMakeLists.txt" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (filesToKeep); ++i)
|
||||
if (filename == filesToKeep[i])
|
||||
|
|
|
|||
|
|
@ -294,32 +294,32 @@ namespace RTASHelpers
|
|||
|
||||
exporter.extraSearchPaths.add (juceWrapperFolder.toWindowsStyle());
|
||||
|
||||
const char* p[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses/Interfaces",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Utilities",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/RTASP_Adapt",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/CoreClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Controls",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Meters",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ViewClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/DSPClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Interfaces",
|
||||
"AlturaPorts/TDMPlugins/common",
|
||||
"AlturaPorts/TDMPlugins/common/Platform",
|
||||
"AlturaPorts/TDMPlugins/common/Macros",
|
||||
"AlturaPorts/TDMPlugins/SignalProcessing/Public",
|
||||
"AlturaPorts/TDMPlugIns/DSPManager/Interfaces",
|
||||
"AlturaPorts/SADriver/Interfaces",
|
||||
"AlturaPorts/DigiPublic/Interfaces",
|
||||
"AlturaPorts/DigiPublic",
|
||||
"AlturaPorts/Fic/Interfaces/DAEClient",
|
||||
"AlturaPorts/NewFileLibs/Cmn",
|
||||
"AlturaPorts/NewFileLibs/DOA",
|
||||
"AlturaPorts/AlturaSource/PPC_H",
|
||||
"AlturaPorts/AlturaSource/AppSupport",
|
||||
"AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc",
|
||||
"xplat/AVX/avx2/avx2sdk/inc" };
|
||||
static const char* p[] = { "AlturaPorts/TDMPlugins/PluginLibrary/EffectClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ProcessClasses/Interfaces",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Utilities",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/RTASP_Adapt",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/CoreClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Controls",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Meters",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/ViewClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/DSPClasses",
|
||||
"AlturaPorts/TDMPlugins/PluginLibrary/Interfaces",
|
||||
"AlturaPorts/TDMPlugins/common",
|
||||
"AlturaPorts/TDMPlugins/common/Platform",
|
||||
"AlturaPorts/TDMPlugins/common/Macros",
|
||||
"AlturaPorts/TDMPlugins/SignalProcessing/Public",
|
||||
"AlturaPorts/TDMPlugIns/DSPManager/Interfaces",
|
||||
"AlturaPorts/SADriver/Interfaces",
|
||||
"AlturaPorts/DigiPublic/Interfaces",
|
||||
"AlturaPorts/DigiPublic",
|
||||
"AlturaPorts/Fic/Interfaces/DAEClient",
|
||||
"AlturaPorts/NewFileLibs/Cmn",
|
||||
"AlturaPorts/NewFileLibs/DOA",
|
||||
"AlturaPorts/AlturaSource/PPC_H",
|
||||
"AlturaPorts/AlturaSource/AppSupport",
|
||||
"AvidCode/AVX2sdk/AVX/avx2/avx2sdk/inc",
|
||||
"xplat/AVX/avx2/avx2sdk/inc" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (p); ++i)
|
||||
exporter.addToExtraSearchPaths (rtasFolder.getChildFile (p[i]));
|
||||
|
|
@ -329,35 +329,35 @@ namespace RTASHelpers
|
|||
exporter.extraSearchPaths.add ("$(DEVELOPER_DIR)/Headers/FlatCarbon");
|
||||
exporter.extraSearchPaths.add ("$(SDKROOT)/Developer/Headers/FlatCarbon");
|
||||
|
||||
const char* p[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Meters",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses",
|
||||
"AlturaPorts/TDMPlugIns/DSPManager/**",
|
||||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption",
|
||||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions",
|
||||
"AlturaPorts/TDMPlugIns/common/**",
|
||||
"AlturaPorts/TDMPlugIns/common/PI_LibInterface",
|
||||
"AlturaPorts/TDMPlugIns/PACEProtection/**",
|
||||
"AlturaPorts/TDMPlugIns/SignalProcessing/**",
|
||||
"AlturaPorts/OMS/Headers",
|
||||
"AlturaPorts/Fic/Interfaces/**",
|
||||
"AlturaPorts/Fic/Source/SignalNets",
|
||||
"AlturaPorts/DSIPublicInterface/PublicHeaders",
|
||||
"DAEWin/Include",
|
||||
"AlturaPorts/DigiPublic/Interfaces",
|
||||
"AlturaPorts/DigiPublic",
|
||||
"AlturaPorts/NewFileLibs/DOA",
|
||||
"AlturaPorts/NewFileLibs/Cmn",
|
||||
"xplat/AVX/avx2/avx2sdk/inc",
|
||||
"xplat/AVX/avx2/avx2sdk/utils" };
|
||||
static const char* p[] = { "AlturaPorts/TDMPlugIns/PlugInLibrary/Controls",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/CoreClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/DSPClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/EffectClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Meters",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ProcessClasses/Interfaces",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/RTASP_Adapt",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/Utilities",
|
||||
"AlturaPorts/TDMPlugIns/PlugInLibrary/ViewClasses",
|
||||
"AlturaPorts/TDMPlugIns/DSPManager/**",
|
||||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/Encryption",
|
||||
"AlturaPorts/TDMPlugIns/SupplementalPlugInLib/GraphicsExtensions",
|
||||
"AlturaPorts/TDMPlugIns/common/**",
|
||||
"AlturaPorts/TDMPlugIns/common/PI_LibInterface",
|
||||
"AlturaPorts/TDMPlugIns/PACEProtection/**",
|
||||
"AlturaPorts/TDMPlugIns/SignalProcessing/**",
|
||||
"AlturaPorts/OMS/Headers",
|
||||
"AlturaPorts/Fic/Interfaces/**",
|
||||
"AlturaPorts/Fic/Source/SignalNets",
|
||||
"AlturaPorts/DSIPublicInterface/PublicHeaders",
|
||||
"DAEWin/Include",
|
||||
"AlturaPorts/DigiPublic/Interfaces",
|
||||
"AlturaPorts/DigiPublic",
|
||||
"AlturaPorts/NewFileLibs/DOA",
|
||||
"AlturaPorts/NewFileLibs/Cmn",
|
||||
"xplat/AVX/avx2/avx2sdk/inc",
|
||||
"xplat/AVX/avx2/avx2sdk/utils" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (p); ++i)
|
||||
exporter.addToExtraSearchPaths (rtasFolder.getChildFile (p[i]));
|
||||
|
|
@ -453,54 +453,58 @@ namespace AUHelpers
|
|||
#define JUCE_AU_PUBLICUTILITY "${DEVELOPER_DIR}/Extras/CoreAudio/PublicUtility/"
|
||||
#define JUCE_AU_PUBLIC "${DEVELOPER_DIR}/Extras/CoreAudio/AudioUnits/AUPublic/"
|
||||
|
||||
const char* appleAUFiles[] = { JUCE_AU_PUBLICUTILITY "CADebugMacros.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAAUParameter.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAAUParameter.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAMutex.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAMutex.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnitTypes.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.h",
|
||||
JUCE_AU_PUBLIC "AUViewBase/AUViewLocalizedStringKeys.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewDispatch.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUBase.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUDispatch.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUDispatch.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUInputElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUInputElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUResources.r",
|
||||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/ComponentBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/ComponentBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUBuffer.cpp",
|
||||
JUCE_AU_PUBLIC "Utility/AUBuffer.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUInputFormatConverter.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUSilentTimeout.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUTimestampGenerator.h", 0 };
|
||||
static const char* appleAUFiles[] =
|
||||
{
|
||||
JUCE_AU_PUBLICUTILITY "CADebugMacros.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAAUParameter.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAAUParameter.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAAudioChannelLayout.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAMutex.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAMutex.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAStreamBasicDescription.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnitTypes.h",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.cpp",
|
||||
JUCE_AU_PUBLICUTILITY "CAVectorUnit.h",
|
||||
JUCE_AU_PUBLIC "AUViewBase/AUViewLocalizedStringKeys.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewDispatch.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewControl.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/CarbonEventHandler.h",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUCarbonViewBase/AUCarbonViewBase.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUBase.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUDispatch.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUDispatch.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUInputElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUInputElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUOutputElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/AUResources.r",
|
||||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/AUScopeElement.h",
|
||||
JUCE_AU_PUBLIC "AUBase/ComponentBase.cpp",
|
||||
JUCE_AU_PUBLIC "AUBase/ComponentBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUMIDIEffectBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUOutputBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/MusicDeviceBase.h",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.cpp",
|
||||
JUCE_AU_PUBLIC "OtherBases/AUEffectBase.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUBuffer.cpp",
|
||||
JUCE_AU_PUBLIC "Utility/AUBuffer.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUInputFormatConverter.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUSilentTimeout.h",
|
||||
JUCE_AU_PUBLIC "Utility/AUTimestampGenerator.h",
|
||||
nullptr
|
||||
};
|
||||
|
||||
for (const char** f = appleAUFiles; *f != nullptr; ++f)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ struct NewProjectWizardClasses
|
|||
|
||||
virtual StringArray getDefaultModules()
|
||||
{
|
||||
const char* mods[] =
|
||||
static const char* mods[] =
|
||||
{
|
||||
"juce_core",
|
||||
"juce_events",
|
||||
|
|
|
|||
|
|
@ -963,9 +963,9 @@ double MidiMessage::getMidiNoteInHertz (int noteNumber, const double frequencyOf
|
|||
return frequencyOfA * pow (2.0, (noteNumber - 69) / 12.0);
|
||||
}
|
||||
|
||||
String MidiMessage::getGMInstrumentName (const int n)
|
||||
const char* MidiMessage::getGMInstrumentName (const int n)
|
||||
{
|
||||
const char* names[] =
|
||||
static const char* names[] =
|
||||
{
|
||||
"Acoustic Grand Piano", "Bright Acoustic Piano", "Electric Grand Piano", "Honky-tonk Piano",
|
||||
"Electric Piano 1", "Electric Piano 2", "Harpsichord", "Clavinet", "Celesta", "Glockenspiel",
|
||||
|
|
@ -992,12 +992,12 @@ String MidiMessage::getGMInstrumentName (const int n)
|
|||
"Applause", "Gunshot"
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, (int) 128) ? names[n] : (const char*) 0;
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
}
|
||||
|
||||
String MidiMessage::getGMInstrumentBankName (const int n)
|
||||
const char* MidiMessage::getGMInstrumentBankName (const int n)
|
||||
{
|
||||
const char* names[] =
|
||||
static const char* names[] =
|
||||
{
|
||||
"Piano", "Chromatic Percussion", "Organ", "Guitar",
|
||||
"Bass", "Strings", "Ensemble", "Brass",
|
||||
|
|
@ -1005,12 +1005,12 @@ String MidiMessage::getGMInstrumentBankName (const int n)
|
|||
"Synth Effects", "Ethnic", "Percussive", "Sound Effects"
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, (int) 16) ? names[n] : (const char*) 0;
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
}
|
||||
|
||||
String MidiMessage::getRhythmInstrumentName (const int n)
|
||||
const char* MidiMessage::getRhythmInstrumentName (const int n)
|
||||
{
|
||||
const char* names[] =
|
||||
static const char* names[] =
|
||||
{
|
||||
"Acoustic Bass Drum", "Bass Drum 1", "Side Stick", "Acoustic Snare",
|
||||
"Hand Clap", "Electric Snare", "Low Floor Tom", "Closed Hi-Hat", "High Floor Tom",
|
||||
|
|
@ -1023,12 +1023,12 @@ String MidiMessage::getRhythmInstrumentName (const int n)
|
|||
"Mute Triangle", "Open Triangle"
|
||||
};
|
||||
|
||||
return (n >= 35 && n <= 81) ? names [n - 35] : (const char*) nullptr;
|
||||
return (n >= 35 && n <= 81) ? names [n - 35] : nullptr;
|
||||
}
|
||||
|
||||
String MidiMessage::getControllerName (const int n)
|
||||
const char* MidiMessage::getControllerName (const int n)
|
||||
{
|
||||
const char* names[] =
|
||||
static const char* names[] =
|
||||
{
|
||||
"Bank Select", "Modulation Wheel (coarse)", "Breath controller (coarse)",
|
||||
0, "Foot Pedal (coarse)", "Portamento Time (coarse)",
|
||||
|
|
@ -1054,5 +1054,5 @@ String MidiMessage::getControllerName (const int n)
|
|||
"Poly Operation"
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, (int) 128) ? names[n] : (const char*) nullptr;
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -889,30 +889,27 @@ public:
|
|||
*/
|
||||
static double getMidiNoteInHertz (int noteNumber, const double frequencyOfA = 440.0) noexcept;
|
||||
|
||||
/** Returns the standard name of a GM instrument.
|
||||
/** Returns the standard name of a GM instrument, or nullptr if unknown for this index.
|
||||
|
||||
@param midiInstrumentNumber the program number 0 to 127
|
||||
@see getProgramChangeNumber
|
||||
*/
|
||||
static String getGMInstrumentName (int midiInstrumentNumber);
|
||||
|
||||
/** Returns the name of a bank of GM instruments.
|
||||
static const char* getGMInstrumentName (int midiInstrumentNumber);
|
||||
|
||||
/** Returns the name of a bank of GM instruments, or nullptr if unknown for this bank number.
|
||||
@param midiBankNumber the bank, 0 to 15
|
||||
*/
|
||||
static String getGMInstrumentBankName (int midiBankNumber);
|
||||
|
||||
/** Returns the standard name of a channel 10 percussion sound.
|
||||
static const char* getGMInstrumentBankName (int midiBankNumber);
|
||||
|
||||
/** Returns the standard name of a channel 10 percussion sound, or nullptr if unknown for this note number.
|
||||
@param midiNoteNumber the key number, 35 to 81
|
||||
*/
|
||||
static String getRhythmInstrumentName (int midiNoteNumber);
|
||||
|
||||
/** Returns the name of a controller type number.
|
||||
static const char* getRhythmInstrumentName (int midiNoteNumber);
|
||||
|
||||
/** Returns the name of a controller type number, or nullptr if unknown for this controller number.
|
||||
@see getControllerNumber
|
||||
*/
|
||||
static String getControllerName (int controllerNumber);
|
||||
static const char* getControllerName (int controllerNumber);
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ AudioFormatWriter* FlacAudioFormat::createWriterFor (OutputStream* out,
|
|||
|
||||
StringArray FlacAudioFormat::getQualityOptions()
|
||||
{
|
||||
const char* options[] = { "0 (Fastest)", "1", "2", "3", "4", "5 (Default)","6", "7", "8 (Highest quality)", 0 };
|
||||
static const char* options[] = { "0 (Fastest)", "1", "2", "3", "4", "5 (Default)","6", "7", "8 (Highest quality)", 0 };
|
||||
return StringArray (options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,11 +180,9 @@ bool LAMEEncoderAudioFormat::isCompressed() { return true; }
|
|||
|
||||
StringArray LAMEEncoderAudioFormat::getQualityOptions()
|
||||
{
|
||||
const char* vbrOptions[] = { "VBR quality 0 (best)", "VBR quality 1", "VBR quality 2", "VBR quality 3",
|
||||
"VBR quality 4 (normal)", "VBR quality 5", "VBR quality 6", "VBR quality 7", "VBR quality 8",
|
||||
"VBR quality 9 (smallest)",
|
||||
nullptr };
|
||||
|
||||
static const char* vbrOptions[] = { "VBR quality 0 (best)", "VBR quality 1", "VBR quality 2", "VBR quality 3",
|
||||
"VBR quality 4 (normal)", "VBR quality 5", "VBR quality 6", "VBR quality 7",
|
||||
"VBR quality 8", "VBR quality 9 (smallest)", nullptr };
|
||||
StringArray opts (vbrOptions);
|
||||
|
||||
const int cbrRates[] = { 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 };
|
||||
|
|
|
|||
|
|
@ -479,8 +479,8 @@ AudioFormatWriter* OggVorbisAudioFormat::createWriterFor (OutputStream* out,
|
|||
|
||||
StringArray OggVorbisAudioFormat::getQualityOptions()
|
||||
{
|
||||
const char* options[] = { "64 kbps", "80 kbps", "96 kbps", "112 kbps", "128 kbps", "160 kbps",
|
||||
"192 kbps", "224 kbps", "256 kbps", "320 kbps", "500 kbps", 0 };
|
||||
static const char* options[] = { "64 kbps", "80 kbps", "96 kbps", "112 kbps", "128 kbps", "160 kbps",
|
||||
"192 kbps", "224 kbps", "256 kbps", "320 kbps", "500 kbps", 0 };
|
||||
return StringArray (options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@ bool Process::openDocument (const String& fileName, const String& parameters)
|
|||
|| ! isFileExecutable (fileName))
|
||||
{
|
||||
// create a command that tries to launch a bunch of likely browsers
|
||||
const char* const browserNames[] = { "xdg-open", "/etc/alternatives/x-www-browser", "firefox", "mozilla",
|
||||
"google-chrome", "chromium-browser", "opera", "konqueror" };
|
||||
static const char* const browserNames[] = { "xdg-open", "/etc/alternatives/x-www-browser", "firefox", "mozilla",
|
||||
"google-chrome", "chromium-browser", "opera", "konqueror" };
|
||||
StringArray cmdLines;
|
||||
|
||||
for (int i = 0; i < numElementsInArray (browserNames); ++i)
|
||||
|
|
|
|||
|
|
@ -132,14 +132,14 @@ namespace FileHelpers
|
|||
|
||||
bool File::isOnCDRomDrive() const
|
||||
{
|
||||
const char* const cdTypes[] = { "cd9660", "cdfs", "cddafs", "udf", 0 };
|
||||
static const char* const cdTypes[] = { "cd9660", "cdfs", "cddafs", "udf", nullptr };
|
||||
|
||||
return FileHelpers::isFileOnDriveType (*this, cdTypes);
|
||||
}
|
||||
|
||||
bool File::isOnHardDisk() const
|
||||
{
|
||||
const char* const nonHDTypes[] = { "nfs", "smbfs", "ramfs", 0 };
|
||||
static const char* const nonHDTypes[] = { "nfs", "smbfs", "ramfs", nullptr };
|
||||
|
||||
return ! (isOnCDRomDrive() || FileHelpers::isFileOnDriveType (*this, nonHDTypes));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ URL URL::getChildURL (const String& subPath) const
|
|||
//==============================================================================
|
||||
bool URL::isProbablyAWebsiteURL (const String& possibleURL)
|
||||
{
|
||||
const char* validProtocols[] = { "http:", "ftp:", "https:" };
|
||||
static const char* validProtocols[] = { "http:", "ftp:", "https:" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (validProtocols); ++i)
|
||||
if (possibleURL.startsWithIgnoreCase (validProtocols[i]))
|
||||
|
|
|
|||
|
|
@ -409,8 +409,8 @@ String Time::getWeekdayName (const bool threeLetterVersion) const
|
|||
|
||||
String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
|
||||
{
|
||||
const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||
const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
|
||||
static const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||
static const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
|
||||
|
||||
monthNumber %= 12;
|
||||
|
||||
|
|
@ -420,8 +420,8 @@ String Time::getMonthName (int monthNumber, const bool threeLetterVersion)
|
|||
|
||||
String Time::getWeekdayName (int day, const bool threeLetterVersion)
|
||||
{
|
||||
const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||
const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
|
||||
static const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||
static const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
|
||||
|
||||
day %= 7;
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ private:
|
|||
|
||||
static bool isFaceSansSerif (const String& family)
|
||||
{
|
||||
const char* sansNames[] = { "Sans", "Verdana", "Arial", "Ubuntu" };
|
||||
static const char* sansNames[] = { "Sans", "Verdana", "Arial", "Ubuntu" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (sansNames); ++i)
|
||||
if (family.containsIgnoreCase (sansNames[i]))
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@ private:
|
|||
StringArray allFonts;
|
||||
FTTypefaceList::getInstance()->getSansSerifNames (allFonts);
|
||||
|
||||
const char* targets[] = { "Verdana", "Bitstream Vera Sans", "Luxi Sans",
|
||||
"Liberation Sans", "DejaVu Sans", "Sans", nullptr };
|
||||
static const char* targets[] = { "Verdana", "Bitstream Vera Sans", "Luxi Sans",
|
||||
"Liberation Sans", "DejaVu Sans", "Sans", nullptr };
|
||||
return pickBestFont (allFonts, targets);
|
||||
}
|
||||
|
||||
|
|
@ -147,8 +147,8 @@ private:
|
|||
StringArray allFonts;
|
||||
FTTypefaceList::getInstance()->getSerifNames (allFonts);
|
||||
|
||||
const char* targets[] = { "Bitstream Vera Serif", "Times", "Nimbus Roman",
|
||||
"Liberation Serif", "DejaVu Serif", "Serif", nullptr };
|
||||
static const char* targets[] = { "Bitstream Vera Serif", "Times", "Nimbus Roman",
|
||||
"Liberation Serif", "DejaVu Serif", "Serif", nullptr };
|
||||
return pickBestFont (allFonts, targets);
|
||||
}
|
||||
|
||||
|
|
@ -157,8 +157,8 @@ private:
|
|||
StringArray allFonts;
|
||||
FTTypefaceList::getInstance()->getMonospacedNames (allFonts);
|
||||
|
||||
const char* targets[] = { "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Sans Mono",
|
||||
"Liberation Mono", "Courier", "DejaVu Mono", "Mono", nullptr };
|
||||
static const char* targets[] = { "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Sans Mono",
|
||||
"Liberation Mono", "Courier", "DejaVu Mono", "Mono", nullptr };
|
||||
return pickBestFont (allFonts, targets);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile)
|
|||
MemoryBlock temp;
|
||||
movieStream->readIntoMemoryBlock (temp);
|
||||
|
||||
const char* const suffixesToTry[] = { ".mov", ".mp3", ".avi", ".m4a" };
|
||||
static const char* const suffixesToTry[] = { ".mov", ".mp3", ".avi", ".m4a" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (suffixesToTry); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -419,8 +419,8 @@ bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle
|
|||
// different types to get QT to try. (We should really be a bit smarter here by
|
||||
// working out in advance which one the stream contains, rather than just trying
|
||||
// each one)
|
||||
const char* const suffixesToTry[] = { "\04.mov", "\04.mp3",
|
||||
"\04.avi", "\04.m4a" };
|
||||
static const char* const suffixesToTry[] = { "\04.mov", "\04.mp3",
|
||||
"\04.avi", "\04.m4a" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (suffixesToTry) && ! ok; ++i)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue