1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-23 01:44:22 +00:00

Minor string changes.

This commit is contained in:
Julian Storer 2010-03-26 18:23:54 +00:00
parent e0e12a8bd9
commit 66643e85ac
74 changed files with 895 additions and 889 deletions

View file

@ -73,13 +73,13 @@ static void getDeviceProperties (const String& deviceID,
snd_ctl_t* handle;
if (snd_ctl_open (&handle, deviceID.upToLastOccurrenceOf (T(","), false, false).toUTF8(), SND_CTL_NONBLOCK) >= 0)
if (snd_ctl_open (&handle, deviceID.upToLastOccurrenceOf (",", false, false).toUTF8(), SND_CTL_NONBLOCK) >= 0)
{
snd_pcm_info_t* info;
snd_pcm_info_alloca (&info);
snd_pcm_info_set_stream (info, SND_PCM_STREAM_PLAYBACK);
snd_pcm_info_set_device (info, deviceID.fromLastOccurrenceOf (T(","), false, false).getIntValue());
snd_pcm_info_set_device (info, deviceID.fromLastOccurrenceOf (",", false, false).getIntValue());
snd_pcm_info_set_subdevice (info, 0);
if (snd_ctl_pcm_info (handle, info) >= 0)
@ -867,7 +867,7 @@ public:
{
String cardId (snd_ctl_card_info_get_id (info));
if (cardId.removeCharacters (T("0123456789")).isEmpty())
if (cardId.removeCharacters ("0123456789").isEmpty())
cardId = String (cardNum);
int device = -1;

View file

@ -399,11 +399,11 @@ void juce_findFileClose (void* handle)
bool juce_launchFile (const String& fileName,
const String& parameters)
{
String cmdString (fileName.replace (T(" "), T("\\ "),false));
String cmdString (fileName.replace (" ", "\\ ",false));
cmdString << " " << parameters;
if (URL::isProbablyAWebsiteURL (fileName)
|| cmdString.startsWithIgnoreCase (T("file:"))
|| cmdString.startsWithIgnoreCase ("file:")
|| URL::isProbablyAnEmailAddress (fileName))
{
// create a command that tries to launch a bunch of likely browsers

View file

@ -199,9 +199,9 @@ public:
// Surely there must be a better way to do this?
const String name (face->family_name);
newFace->setSerif (! (name.containsIgnoreCase (T("Sans"))
|| name.containsIgnoreCase (T("Verdana"))
|| name.containsIgnoreCase (T("Arial"))));
newFace->setSerif (! (name.containsIgnoreCase ("Sans")
|| name.containsIgnoreCase ("Verdana")
|| name.containsIgnoreCase ("Arial")));
}
FT_Done_Face (face);

View file

@ -193,8 +193,8 @@ public:
{
const String portName (ports [j++]);
if (portName.upToFirstOccurrenceOf (T(":"), false, false) == getName())
names.add (portName.fromFirstOccurrenceOf (T(":"), false, false));
if (portName.upToFirstOccurrenceOf (":", false, false) == getName())
names.add (portName.fromFirstOccurrenceOf (":", false, false));
}
free (ports);
@ -240,7 +240,7 @@ public:
{
const String portName (ports[i]);
if (inputChannels[i] && portName.upToFirstOccurrenceOf (T(":"), false, false) == getName())
if (inputChannels[i] && portName.upToFirstOccurrenceOf (":", false, false) == getName())
{
int error = JUCE_NAMESPACE::jack_connect (client, ports[i], JUCE_NAMESPACE::jack_port_name ((jack_port_t*) inputPorts[i]));
if (error != 0)
@ -264,7 +264,7 @@ public:
{
const String portName (ports[i]);
if (outputChannels[i] && portName.upToFirstOccurrenceOf (T(":"), false, false) == getName())
if (outputChannels[i] && portName.upToFirstOccurrenceOf (":", false, false) == getName())
{
int error = JUCE_NAMESPACE::jack_connect (client, JUCE_NAMESPACE::jack_port_name ((jack_port_t*) outputPorts[i]), ports[i]);
if (error != 0)
@ -500,7 +500,7 @@ public:
while (ports[j] != 0)
{
String clientName (ports[j]);
clientName = clientName.upToFirstOccurrenceOf (T(":"), false, false);
clientName = clientName.upToFirstOccurrenceOf (":", false, false);
if (clientName != String (JUCE_JACK_CLIENT_NAME)
&& ! inputNames.contains (clientName))
@ -524,7 +524,7 @@ public:
while (ports[j] != 0)
{
String clientName (ports[j]);
clientName = clientName.upToFirstOccurrenceOf (T(":"), false, false);
clientName = clientName.upToFirstOccurrenceOf (":", false, false);
if (clientName != String (JUCE_JACK_CLIENT_NAME)
&& ! outputNames.contains (clientName))

View file

@ -131,7 +131,7 @@ public:
int proxyPort = 0;
String proxyURL (getenv ("http_proxy"));
if (proxyURL.startsWithIgnoreCase (T("http://")))
if (proxyURL.startsWithIgnoreCase ("http://"))
{
if (! decomposeURL (proxyURL, proxyName, proxyPath, proxyPort))
return false;
@ -217,20 +217,18 @@ public:
StringArray lines;
lines.addLines (responseHeader);
// NB - using charToString() here instead of just T(" "), because that was
// causing a mysterious gcc internal compiler error...
const int statusCode = responseHeader.fromFirstOccurrenceOf (String::charToString (' '), false, false)
const int statusCode = responseHeader.fromFirstOccurrenceOf (" ", false, false)
.substring (0, 3).getIntValue();
//int contentLength = findHeaderItem (lines, T("Content-Length:")).getIntValue();
//bool isChunked = findHeaderItem (lines, T("Transfer-Encoding:")).equalsIgnoreCase ("chunked");
//int contentLength = findHeaderItem (lines, "Content-Length:").getIntValue();
//bool isChunked = findHeaderItem (lines, "Transfer-Encoding:").equalsIgnoreCase ("chunked");
String location (findHeaderItem (lines, "Location:"));
if (statusCode >= 300 && statusCode < 400
&& location.isNotEmpty())
{
if (! location.startsWithIgnoreCase (T("http://")))
if (! location.startsWithIgnoreCase ("http://"))
location = "http://" + location;
if (levelsOfRedirection++ < 3)
@ -357,7 +355,7 @@ private:
const String header (String::fromUTF8 ((const char*) buffer.getData()));
if (header.startsWithIgnoreCase (T("HTTP/")))
if (header.startsWithIgnoreCase ("HTTP/"))
return header.trimEnd();
return String::empty;
@ -367,7 +365,7 @@ private:
static bool decomposeURL (const String& url,
String& host, String& path, int& port)
{
if (! url.startsWithIgnoreCase (T("http://")))
if (! url.startsWithIgnoreCase ("http://"))
return false;
const int nextSlash = url.indexOfChar (7, '/');

View file

@ -92,22 +92,22 @@ static const String getCpuInfo (const char* key, bool lastOne = false) throw()
bool SystemStats::hasMMX() throw()
{
return getCpuInfo ("flags").contains (T("mmx"));
return getCpuInfo ("flags").contains ("mmx");
}
bool SystemStats::hasSSE() throw()
{
return getCpuInfo ("flags").contains (T("sse"));
return getCpuInfo ("flags").contains ("sse");
}
bool SystemStats::hasSSE2() throw()
{
return getCpuInfo ("flags").contains (T("sse2"));
return getCpuInfo ("flags").contains ("sse2");
}
bool SystemStats::has3DNow() throw()
{
return getCpuInfo ("flags").contains (T("3dnow"));
return getCpuInfo ("flags").contains ("3dnow");
}
const String SystemStats::getCpuVendor() throw()

View file

@ -2639,7 +2639,7 @@ private:
}
for (int i = 0; i < lines.size(); ++i)
dragAndDropFiles.add (URL::removeEscapeChars (lines[i].fromFirstOccurrenceOf (T("file://"), false, true)));
dragAndDropFiles.add (URL::removeEscapeChars (lines[i].fromFirstOccurrenceOf ("file://", false, true)));
dragAndDropFiles.trim();
dragAndDropFiles.removeEmptyStrings();