mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Removed a few more uses of String::empty.
This commit is contained in:
parent
2623f4d1e1
commit
2edec00b55
46 changed files with 91 additions and 91 deletions
|
|
@ -265,7 +265,7 @@ void ComponentLayout::copySelectedToClipboard()
|
|||
}
|
||||
}
|
||||
|
||||
SystemClipboard::copyTextToClipboard (clip.createDocument (String::empty, false, false));
|
||||
SystemClipboard::copyTextToClipboard (clip.createDocument ("", false, false));
|
||||
}
|
||||
|
||||
void ComponentLayout::paste()
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ void JucerDocument::fillInGeneratedCode (GeneratedCode& code) const
|
|||
|
||||
ScopedPointer<XmlElement> e (createXml());
|
||||
jassert (e != nullptr);
|
||||
code.jucerMetadata = e->createDocument (String::empty, false, false);
|
||||
code.jucerMetadata = e->createDocument ("", false, false);
|
||||
|
||||
resources.fillInGeneratedCode (code);
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ void PaintRoutine::copySelectedToClipboard()
|
|||
}
|
||||
}
|
||||
|
||||
SystemClipboard::copyTextToClipboard (clip.createDocument (String::empty, false, false));
|
||||
SystemClipboard::copyTextToClipboard (clip.createDocument ("", false, false));
|
||||
}
|
||||
|
||||
void PaintRoutine::paste()
|
||||
|
|
|
|||
|
|
@ -408,15 +408,15 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
|
|||
jassert (&newSetup != ¤tSetup); // this will have no effect
|
||||
|
||||
if (newSetup == currentSetup && currentAudioDevice != nullptr)
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
if (! (newSetup == currentSetup))
|
||||
sendChangeMessage();
|
||||
|
||||
stopDevice();
|
||||
|
||||
const String newInputDeviceName (numInputChansNeeded == 0 ? String::empty : newSetup.inputDeviceName);
|
||||
const String newOutputDeviceName (numOutputChansNeeded == 0 ? String::empty : newSetup.outputDeviceName);
|
||||
const String newInputDeviceName (numInputChansNeeded == 0 ? String() : newSetup.inputDeviceName);
|
||||
const String newOutputDeviceName (numOutputChansNeeded == 0 ? String() : newSetup.outputDeviceName);
|
||||
|
||||
String error;
|
||||
AudioIODeviceType* type = getCurrentDeviceTypeObject();
|
||||
|
|
@ -428,7 +428,7 @@ String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& newSetup
|
|||
if (treatAsChosenDevice)
|
||||
updateXml();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
if (currentSetup.inputDeviceName != newInputDeviceName
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
{
|
||||
// OpenSL has piss-poor support for determining latency, so the only way I can find to
|
||||
// get a number for this is by asking the AudioTrack/AudioRecord classes..
|
||||
AndroidAudioIODevice javaDevice (String::empty);
|
||||
AndroidAudioIODevice javaDevice (String());
|
||||
|
||||
// this is a total guess about how to calculate the latency, but seems to vaguely agree
|
||||
// with the devices I've tested.. YMMV
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ namespace AiffFileHelpers
|
|||
out.writeIntBigEndian (values.getValue (prefix + "TimeStamp", "0").getIntValue());
|
||||
out.writeShortBigEndian ((short) values.getValue (prefix + "Identifier", "0").getIntValue());
|
||||
|
||||
const String comment (values.getValue (prefix + "Text", String::empty));
|
||||
const String comment (values.getValue (prefix + "Text", String()));
|
||||
|
||||
const size_t commentLength = jmin (comment.getNumBytesAsUTF8(), (size_t) 65534);
|
||||
out.writeShortBigEndian ((short) commentLength + 1);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
void addMetadataArg (const StringPairArray& metadata, const char* key, const char* lameFlag)
|
||||
{
|
||||
const String value (metadata.getValue (key, String::empty));
|
||||
const String value (metadata.getValue (key, String()));
|
||||
|
||||
if (value.isNotEmpty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace AudioUnitFormatHelpers
|
|||
fileOrIdentifier.lastIndexOfChar ('/')) + 1));
|
||||
|
||||
StringArray tokens;
|
||||
tokens.addTokens (s, ",", String::empty);
|
||||
tokens.addTokens (s, ",", String());
|
||||
tokens.removeEmptyStrings();
|
||||
|
||||
if (tokens.size() == 3)
|
||||
|
|
@ -570,7 +570,7 @@ public:
|
|||
if (isPositiveAndBelow (index, getNumInputChannels()))
|
||||
return "Input " + String (index + 1);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
const String getOutputChannelName (int index) const override
|
||||
|
|
@ -578,7 +578,7 @@ public:
|
|||
if (isPositiveAndBelow (index, getNumOutputChannels()))
|
||||
return "Output " + String (index + 1);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
bool isInputChannelStereoPair (int index) const override { return isPositiveAndBelow (index, getNumInputChannels()); }
|
||||
|
|
@ -652,7 +652,7 @@ public:
|
|||
if (const ParamInfo* p = parameters[index])
|
||||
return p->name;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
const String getParameterText (int index) override { return String (getParameter (index)); }
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public:
|
|||
desc.lastFileModTime = module->file.getLastModificationTime();
|
||||
desc.pluginFormatName = "LADSPA";
|
||||
desc.category = getCategory();
|
||||
desc.manufacturerName = plugin != nullptr ? String (plugin->Maker) : String::empty;
|
||||
desc.manufacturerName = plugin != nullptr ? String (plugin->Maker) : String();
|
||||
desc.version = getVersion();
|
||||
desc.numInputChannels = getNumInputChannels();
|
||||
desc.numOutputChannels = getNumOutputChannels();
|
||||
|
|
@ -338,7 +338,7 @@ public:
|
|||
if (isPositiveAndBelow (index, getNumInputChannels()))
|
||||
return String (plugin->PortNames [inputs [index]]).trim();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
const String getOutputChannelName (const int index) const
|
||||
|
|
@ -346,7 +346,7 @@ public:
|
|||
if (isPositiveAndBelow (index, getNumInputChannels()))
|
||||
return String (plugin->PortNames [outputs [index]]).trim();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -390,7 +390,7 @@ public:
|
|||
return String (plugin->PortNames [parameters [index]]).trim();
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
const String getParameterText (int index)
|
||||
|
|
@ -407,7 +407,7 @@ public:
|
|||
return String (parameterValues[index].scaled, 4);
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -424,7 +424,7 @@ public:
|
|||
const String getProgramName (int index)
|
||||
{
|
||||
// XXX
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
void changeProgramName (int index, const String& newName)
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ void AudioProcessor::updateHostDisplay()
|
|||
l->audioProcessorChanged (this);
|
||||
}
|
||||
|
||||
String AudioProcessor::getParameterLabel (int) const { return String::empty; }
|
||||
String AudioProcessor::getParameterLabel (int) const { return String(); }
|
||||
bool AudioProcessor::isParameterAutomatable (int) const { return true; }
|
||||
bool AudioProcessor::isMetaParameter (int) const { return false; }
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ void AudioProcessor::copyXmlToBinary (const XmlElement& xml, juce::MemoryBlock&
|
|||
MemoryOutputStream out (destData, false);
|
||||
out.writeInt (magicXmlNumber);
|
||||
out.writeInt (0);
|
||||
xml.writeToStream (out, String::empty, true, false);
|
||||
xml.writeToStream (out, String(), true, false);
|
||||
out.writeByte (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1367,7 +1367,7 @@ const String AudioProcessorGraph::AudioGraphIOProcessor::getName() const
|
|||
default: break;
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
void AudioProcessorGraph::AudioGraphIOProcessor::fillInPluginDescription (PluginDescription& d) const
|
||||
|
|
@ -1469,7 +1469,7 @@ const String AudioProcessorGraph::AudioGraphIOProcessor::getInputChannelName (in
|
|||
default: break;
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (int channelIndex) const
|
||||
|
|
@ -1481,7 +1481,7 @@ const String AudioProcessorGraph::AudioGraphIOProcessor::getOutputChannelName (i
|
|||
default: break;
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
bool AudioProcessorGraph::AudioGraphIOProcessor::isInputChannelStereoPair (int /*index*/) const
|
||||
|
|
@ -1501,17 +1501,17 @@ bool AudioProcessorGraph::AudioGraphIOProcessor::hasEditor() const
|
|||
AudioProcessorEditor* AudioProcessorGraph::AudioGraphIOProcessor::createEditor() { return nullptr; }
|
||||
|
||||
int AudioProcessorGraph::AudioGraphIOProcessor::getNumParameters() { return 0; }
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getParameterName (int) { return String::empty; }
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getParameterName (int) { return String(); }
|
||||
|
||||
float AudioProcessorGraph::AudioGraphIOProcessor::getParameter (int) { return 0.0f; }
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getParameterText (int) { return String::empty; }
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getParameterText (int) { return String(); }
|
||||
void AudioProcessorGraph::AudioGraphIOProcessor::setParameter (int, float) { }
|
||||
|
||||
int AudioProcessorGraph::AudioGraphIOProcessor::getNumPrograms() { return 0; }
|
||||
int AudioProcessorGraph::AudioGraphIOProcessor::getCurrentProgram() { return 0; }
|
||||
void AudioProcessorGraph::AudioGraphIOProcessor::setCurrentProgram (int) { }
|
||||
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getProgramName (int) { return String::empty; }
|
||||
const String AudioProcessorGraph::AudioGraphIOProcessor::getProgramName (int) { return String(); }
|
||||
void AudioProcessorGraph::AudioGraphIOProcessor::changeProgramName (int, const String&) {}
|
||||
|
||||
void AudioProcessorGraph::AudioGraphIOProcessor::getStateInformation (juce::MemoryBlock&) {}
|
||||
|
|
|
|||
|
|
@ -372,15 +372,15 @@ public:
|
|||
AudioProcessorEditor* createEditor() { return nullptr; }
|
||||
|
||||
int getNumParameters() { return 0; }
|
||||
const String getParameterName (int) { return String::empty; }
|
||||
const String getParameterName (int) { return String(); }
|
||||
float getParameter (int) { return 0; }
|
||||
const String getParameterText (int) { return String::empty; }
|
||||
const String getParameterText (int) { return String(); }
|
||||
void setParameter (int, float) { }
|
||||
|
||||
int getNumPrograms() { return 0; }
|
||||
int getCurrentProgram() { return 0; }
|
||||
void setCurrentProgram (int) { }
|
||||
const String getProgramName (int) { return String::empty; }
|
||||
const String getProgramName (int) { return String(); }
|
||||
void changeProgramName (int, const String&) { }
|
||||
|
||||
void getStateInformation (juce::MemoryBlock&);
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ void PropertySet::removeValue (StringRef keyName)
|
|||
void PropertySet::setValue (const String& keyName, const XmlElement* const xml)
|
||||
{
|
||||
setValue (keyName, xml == nullptr ? var::null
|
||||
: var (xml->createDocument (String::empty, true)));
|
||||
: var (xml->createDocument ("", true)));
|
||||
}
|
||||
|
||||
bool PropertySet::containsKey (StringRef keyName) const noexcept
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
@param keyName the name of the property to retrieve
|
||||
@param defaultReturnValue a value to return if the named property doesn't actually exist
|
||||
*/
|
||||
String getValue (StringRef keyName, const String& defaultReturnValue = String::empty) const noexcept;
|
||||
String getValue (StringRef keyName, const String& defaultReturnValue = String()) const noexcept;
|
||||
|
||||
/** Returns one of the properties as an integer.
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const File File::nonexistent;
|
|||
String File::parseAbsolutePath (const String& p)
|
||||
{
|
||||
if (p.isEmpty())
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
// Windows..
|
||||
|
|
@ -482,11 +482,11 @@ bool File::loadFileAsData (MemoryBlock& destBlock) const
|
|||
String File::loadFileAsString() const
|
||||
{
|
||||
if (! existsAsFile())
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
FileInputStream in (*this);
|
||||
return in.openedOk() ? in.readEntireStreamAsString()
|
||||
: String::empty;
|
||||
: String();
|
||||
}
|
||||
|
||||
void File::readLines (StringArray& destLines) const
|
||||
|
|
@ -598,7 +598,7 @@ String File::getFileExtension() const
|
|||
if (indexOfDot > fullPath.lastIndexOfChar (separator))
|
||||
return fullPath.substring (indexOfDot);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
bool File::hasFileExtension (StringRef possibleSuffix) const
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
The file will not be created until you write to it. And remember that when
|
||||
this object is deleted, the file will also be deleted!
|
||||
*/
|
||||
TemporaryFile (const String& suffix = String::empty,
|
||||
TemporaryFile (const String& suffix = String(),
|
||||
int optionFlags = 0);
|
||||
|
||||
/** Creates a temporary file in the same directory as a specified file.
|
||||
|
|
|
|||
|
|
@ -951,7 +951,7 @@ String BigInteger::toString (const int base, const int minimumNumCharacters) con
|
|||
else
|
||||
{
|
||||
jassertfalse; // can't do the specified base!
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
s = s.paddedLeft ('0', minimumNumCharacters);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual String getName() const
|
||||
{
|
||||
jassertfalse; // You shouldn't call this for an expression that's not actually a function!
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
virtual void renameSymbol (const Symbol& oldSymbol, const String& newName, const Scope& scope, int recursionDepth)
|
||||
|
|
@ -1181,5 +1181,5 @@ void Expression::Scope::visitRelativeScope (const String& scopeName, Visitor&) c
|
|||
|
||||
String Expression::Scope::getScopeUID() const
|
||||
{
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ bool File::isOnRemovableDrive() const
|
|||
|
||||
String File::getVersion() const
|
||||
{
|
||||
return String::empty; // xxx not yet implemented
|
||||
return String(); // xxx not yet implemented
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ private:
|
|||
{
|
||||
char c = 0;
|
||||
if (read (&c, 1) != 1)
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
buffer.writeByte (c);
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ private:
|
|||
if (header.startsWithIgnoreCase ("HTTP/"))
|
||||
return header;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
static void writeValueIfNotPresent (MemoryOutputStream& dest, const String& headers, const String& key, const String& value)
|
||||
|
|
@ -432,7 +432,7 @@ private:
|
|||
if (lines[i].startsWithIgnoreCase (itemName))
|
||||
return lines[i].substring (itemName.length()).trim();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebInputStream)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ String SystemStats::getOperatingSystemName()
|
|||
|
||||
String SystemStats::getDeviceDescription()
|
||||
{
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
bool SystemStats::isOperatingSystem64Bit()
|
||||
|
|
@ -69,7 +69,7 @@ namespace LinuxStatsHelpers
|
|||
if (lines[i].startsWithIgnoreCase (key))
|
||||
return lines[i].fromFirstOccurrenceOf (":", false, false).trim();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ String SystemStats::getLogonName()
|
|||
if (struct passwd* const pw = getpwuid (getuid()))
|
||||
return CharPointer_UTF8 (pw->pw_name);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
String SystemStats::getFullUserName()
|
||||
|
|
@ -121,7 +121,7 @@ String SystemStats::getComputerName()
|
|||
if (gethostname (name, sizeof (name) - 1) == 0)
|
||||
return name;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
static String getLocaleValue (nl_item key)
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ String File::getVersion() const
|
|||
return nsStringToJuce (name);
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
String String::fromCFString (CFStringRef cfString)
|
||||
{
|
||||
if (cfString == 0)
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
CFRange range = { 0, CFStringGetLength (cfString) };
|
||||
HeapBlock <UniChar> u ((size_t) range.length + 1);
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
|
|||
return iOS;
|
||||
#else
|
||||
StringArray parts;
|
||||
parts.addTokens (getOSXVersion(), ".", String::empty);
|
||||
parts.addTokens (getOSXVersion(), ".", String());
|
||||
|
||||
jassert (parts[0].getIntValue() == 10);
|
||||
const int major = parts[1].getIntValue();
|
||||
|
|
@ -148,7 +148,7 @@ String SystemStats::getDeviceDescription()
|
|||
#if JUCE_IOS
|
||||
return nsStringToJuce ([[UIDevice currentDevice] model]);
|
||||
#else
|
||||
return String::empty;
|
||||
return String();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ String SystemStats::getCpuVendor()
|
|||
|
||||
return String (reinterpret_cast <const char*> (vendor), 12);
|
||||
#else
|
||||
return String::empty;
|
||||
return String();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ String SystemStats::getComputerName()
|
|||
if (gethostname (name, sizeof (name) - 1) == 0)
|
||||
return String (name).upToLastOccurrenceOf (".local", false, true);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
static String getLocaleValue (CFStringRef key)
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ String File::getVolumeLabel() const
|
|||
}
|
||||
#endif
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
int File::getVolumeSerialNumber() const
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ IPAddress::IPAddress (uint32 n) noexcept
|
|||
IPAddress::IPAddress (const String& adr)
|
||||
{
|
||||
StringArray tokens;
|
||||
tokens.addTokens (adr, ".", String::empty);
|
||||
tokens.addTokens (adr, ".", String());
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
address[i] = (uint8) tokens[i].getIntValue();
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public:
|
|||
|
||||
@see waitForNextConnection
|
||||
*/
|
||||
bool createListener (int portNumber, const String& localHostName = String::empty);
|
||||
bool createListener (int portNumber, const String& localHostName = String());
|
||||
|
||||
/** When in "listener" mode, this waits for a connection and spawns it as a new
|
||||
socket.
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ namespace URLHelpers
|
|||
<< "\"; filename=\"" << file.getFileName() << "\"\r\n";
|
||||
|
||||
const String mimeType (url.getMimeTypesOfUploadFiles()
|
||||
.getValue (paramName, String::empty));
|
||||
.getValue (paramName, String()));
|
||||
|
||||
if (mimeType.isNotEmpty())
|
||||
data << "Content-Type: " << mimeType << "\r\n";
|
||||
|
|
@ -253,7 +253,7 @@ String URL::getSubPath() const
|
|||
{
|
||||
const int startOfPath = URLHelpers::findStartOfPath (url);
|
||||
|
||||
return startOfPath <= 0 ? String::empty
|
||||
return startOfPath <= 0 ? String()
|
||||
: url.substring (startOfPath);
|
||||
}
|
||||
|
||||
|
|
@ -363,7 +363,7 @@ String URL::readEntireTextStream (const bool usePostCommand) const
|
|||
if (in != nullptr)
|
||||
return in->readEntireStreamAsString();
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
XmlElement* URL::readEntireXmlStream (const bool usePostCommand) const
|
||||
|
|
@ -470,5 +470,5 @@ bool URL::launchInDefaultBrowser() const
|
|||
if (u.containsChar ('@') && ! u.containsChar (':'))
|
||||
u = "mailto:" + u;
|
||||
|
||||
return Process::openDocument (u, String::empty);
|
||||
return Process::openDocument (u, String());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ public:
|
|||
InputStream* createInputStream (bool usePostCommand,
|
||||
OpenStreamProgressCallback* progressCallback = nullptr,
|
||||
void* progressCallbackContext = nullptr,
|
||||
String extraHeaders = String::empty,
|
||||
String extraHeaders = String(),
|
||||
int connectionTimeOutMs = 0,
|
||||
StringPairArray* responseHeaders = nullptr) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ String StringArray::joinIntoString (StringRef separator, int start, int numberTo
|
|||
start = 0;
|
||||
|
||||
if (start >= last)
|
||||
return String::empty;
|
||||
return String();
|
||||
|
||||
if (start == last - 1)
|
||||
return strings.getReference (start);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace StringPoolHelpers
|
|||
String::CharPointerType StringPool::getPooledString (const String& s)
|
||||
{
|
||||
if (s.isEmpty())
|
||||
return String::empty.getCharPointer();
|
||||
return String().getCharPointer();
|
||||
|
||||
return StringPoolHelpers::getPooledStringFromArray (strings, s, lock);
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ String::CharPointerType StringPool::getPooledString (const String& s)
|
|||
String::CharPointerType StringPool::getPooledString (const char* const s)
|
||||
{
|
||||
if (s == nullptr || *s == 0)
|
||||
return String::empty.getCharPointer();
|
||||
return String().getCharPointer();
|
||||
|
||||
return StringPoolHelpers::getPooledStringFromArray (strings, s, lock);
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ String::CharPointerType StringPool::getPooledString (const char* const s)
|
|||
String::CharPointerType StringPool::getPooledString (const wchar_t* const s)
|
||||
{
|
||||
if (s == nullptr || *s == 0)
|
||||
return String::empty.getCharPointer();
|
||||
return String().getCharPointer();
|
||||
|
||||
return StringPoolHelpers::getPooledStringFromArray (strings, s, lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ bool PropertiesFile::loadAsXml()
|
|||
{
|
||||
getAllProperties().set (name,
|
||||
e->getFirstChildElement() != nullptr
|
||||
? e->getFirstChildElement()->createDocument (String::empty, true)
|
||||
? e->getFirstChildElement()->createDocument ("", true)
|
||||
: e->getStringAttribute (PropertyFileConstants::valueAttribute));
|
||||
}
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ bool PropertiesFile::saveAsXml()
|
|||
if (pl != nullptr && ! pl->isLocked())
|
||||
return false; // locking failure..
|
||||
|
||||
if (doc.writeToFile (file, String::empty))
|
||||
if (doc.writeToFile (file, String()))
|
||||
{
|
||||
needsWriting = false;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ String UndoManager::getUndoDescription() const
|
|||
if (const ActionSet* const s = getCurrentSet())
|
||||
return s->name;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
String UndoManager::getRedoDescription() const
|
||||
|
|
@ -243,7 +243,7 @@ String UndoManager::getRedoDescription() const
|
|||
if (const ActionSet* const s = getNextSet())
|
||||
return s->name;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
Time UndoManager::getTimeOfUndoTransaction() const
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public:
|
|||
@see beginNewTransaction
|
||||
*/
|
||||
bool perform (UndoableAction* action,
|
||||
const String& actionName = String::empty);
|
||||
const String& actionName = String());
|
||||
|
||||
/** Starts a new group of actions that together will be treated as a single transaction.
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
@param actionName a description of the transaction that is about to be
|
||||
performed
|
||||
*/
|
||||
void beginNewTransaction (const String& actionName = String::empty);
|
||||
void beginNewTransaction (const String& actionName = String());
|
||||
|
||||
/** Changes the name stored for the current transaction.
|
||||
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
output.writeString (String::empty);
|
||||
output.writeString (String());
|
||||
output.writeCompressedInt (0);
|
||||
output.writeCompressedInt (0);
|
||||
}
|
||||
|
|
@ -962,7 +962,7 @@ ValueTree ValueTree::fromXml (const XmlElement& xml)
|
|||
String ValueTree::toXmlString() const
|
||||
{
|
||||
const ScopedPointer<XmlElement> xml (createXml());
|
||||
return xml != nullptr ? xml->createDocument (String::empty) : String::empty;
|
||||
return xml != nullptr ? xml->createDocument ("") : String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ String InterprocessConnection::getConnectedHostName() const
|
|||
return "localhost";
|
||||
}
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ struct JUCEApplicationBase::MultipleInstanceHandler {};
|
|||
#if JUCE_ANDROID
|
||||
|
||||
StringArray JUCEApplicationBase::getCommandLineParameterArray() { return StringArray(); }
|
||||
String JUCEApplicationBase::getCommandLineParameters() { return String::empty; }
|
||||
String JUCEApplicationBase::getCommandLineParameters() { return String(); }
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -99,13 +99,13 @@ namespace CustomTypefaceHelpers
|
|||
|
||||
//==============================================================================
|
||||
CustomTypeface::CustomTypeface()
|
||||
: Typeface (String::empty, String::empty)
|
||||
: Typeface (String(), String())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
CustomTypeface::CustomTypeface (InputStream& serialisedTypefaceStream)
|
||||
: Typeface (String::empty, String::empty)
|
||||
: Typeface (String(), String())
|
||||
{
|
||||
clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ public:
|
|||
static Rectangle fromString (StringRef stringVersion)
|
||||
{
|
||||
StringArray toks;
|
||||
toks.addTokens (stringVersion.text.findEndOfWhitespace(), ",; \t\r\n", String::empty);
|
||||
toks.addTokens (stringVersion.text.findEndOfWhitespace(), ",; \t\r\n", "");
|
||||
|
||||
return Rectangle (parseIntAfterSpace (toks[0]),
|
||||
parseIntAfterSpace (toks[1]),
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ private:
|
|||
file = getFontFile (family, "Regular");
|
||||
|
||||
if (! file.exists())
|
||||
file = getFontFile (family, String::empty);
|
||||
file = getFontFile (family, String());
|
||||
|
||||
return file;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
const KnownTypeface* ftFace = matchTypeface (fontName, fontStyle);
|
||||
|
||||
if (ftFace == nullptr) ftFace = matchTypeface (fontName, "Regular");
|
||||
if (ftFace == nullptr) ftFace = matchTypeface (fontName, String::empty);
|
||||
if (ftFace == nullptr) ftFace = matchTypeface (fontName, String());
|
||||
|
||||
if (ftFace != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ StringArray FTTypefaceList::getDefaultFontDirectories()
|
|||
{
|
||||
if (e->getStringAttribute ("prefix") == "xdg")
|
||||
{
|
||||
String xdgDataHome (SystemStats::getEnvironmentVariable ("XDG_DATA_HOME", String::empty));
|
||||
String xdgDataHome (SystemStats::getEnvironmentVariable ("XDG_DATA_HOME", String()));
|
||||
|
||||
if (xdgDataHome.trimStart().isEmpty())
|
||||
xdgDataHome = "~/.local/share";
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ String ApplicationCommandManager::getNameOfCommand (const CommandID commandID) c
|
|||
if (const ApplicationCommandInfo* const ci = getCommandForID (commandID))
|
||||
return ci->shortName;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
String ApplicationCommandManager::getDescriptionOfCommand (const CommandID commandID) const noexcept
|
||||
|
|
@ -136,7 +136,7 @@ String ApplicationCommandManager::getDescriptionOfCommand (const CommandID comma
|
|||
return ci->description.isNotEmpty() ? ci->description
|
||||
: ci->shortName;
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
StringArray ApplicationCommandManager::getCommandCategories() const
|
||||
|
|
|
|||
|
|
@ -944,7 +944,7 @@ private:
|
|||
}
|
||||
|
||||
String getStyleAttribute (const XmlPath& xml, const String& attributeName,
|
||||
const String& defaultValue = String::empty) const
|
||||
const String& defaultValue = String()) const
|
||||
{
|
||||
if (xml->hasAttribute (attributeName))
|
||||
return xml->getStringAttribute (attributeName, defaultValue);
|
||||
|
|
@ -953,7 +953,7 @@ private:
|
|||
|
||||
if (styleAtt.isNotEmpty())
|
||||
{
|
||||
const String value (getAttributeFromStyleList (styleAtt, attributeName, String::empty));
|
||||
const String value (getAttributeFromStyleList (styleAtt, attributeName, String()));
|
||||
|
||||
if (value.isNotEmpty())
|
||||
return value;
|
||||
|
|
@ -991,7 +991,7 @@ private:
|
|||
if (xml.parent != nullptr)
|
||||
return getInheritedAttribute (*xml.parent, attributeName);
|
||||
|
||||
return String::empty;
|
||||
return String();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -1144,7 +1144,7 @@ private:
|
|||
StringArray tokens;
|
||||
tokens.addTokens (t.fromFirstOccurrenceOf ("(", false, false)
|
||||
.upToFirstOccurrenceOf (")", false, false),
|
||||
", ", String::empty);
|
||||
", ", "");
|
||||
|
||||
tokens.removeEmptyStrings (true);
|
||||
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ String SystemClipboard::getTextFromClipboard()
|
|||
{
|
||||
NSString* text = [[NSPasteboard generalPasteboard] stringForType: NSStringPboardType];
|
||||
|
||||
return text == nil ? String::empty
|
||||
return text == nil ? String()
|
||||
: nsStringToJuce (text);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ String TableHeaderComponent::toString() const
|
|||
e->setAttribute ("width", ci->width);
|
||||
}
|
||||
|
||||
return doc.createDocument (String::empty, true, false);
|
||||
return doc.createDocument ("", true, false);
|
||||
}
|
||||
|
||||
void TableHeaderComponent::restoreFromString (const String& storedVersion)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue