Bug 869836 - Part 11: Use Append('c') instead of AppendLiteral("c"). r=ehsan

--HG--
extra : rebase_source : 08bcbfd804f1adcab40c7d59fa56deda1f6e0829
This commit is contained in:
Birunthan Mohanathas 2014-05-26 21:54:58 +03:00
parent 84d3adc780
commit f9b1b35c3e
16 changed files with 24 additions and 24 deletions

View File

@ -990,7 +990,7 @@ nsWindowsShellService::OpenApplication(int32_t aApplication)
::RegCloseKey(theKey);
// Find the "open" command
application.AppendLiteral("\\");
application.Append('\\');
application.Append(buf);
application.AppendLiteral("\\shell\\open\\command");

View File

@ -2262,7 +2262,7 @@ Element::DescribeAttribute(uint32_t index, nsAString& aOutDescription) const
value.Insert(char16_t('\\'), uint32_t(i));
}
aOutDescription.Append(value);
aOutDescription.AppendLiteral("\"");
aOutDescription.Append('"');
}
#ifdef DEBUG

View File

@ -811,7 +811,7 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
message.AppendInt(mNetworkSelectionMode);
message.AppendLiteral(",0,\"");
message.Append(NS_ConvertUTF16toUTF8(mOperatorName));
message.AppendLiteral("\"");
message.Append('"');
SendLine(message.get());
} else if (msg.Find("AT+VTS=") != -1) {
ParseAtCommand(msg, 7, atCommandValues);

View File

@ -716,7 +716,7 @@ BluetoothOppManager::RetrieveSentFileName()
EmptyCString(),
extension);
if (NS_SUCCEEDED(rv)) {
mFileName.AppendLiteral(".");
mFileName.Append('.');
AppendUTF8toUTF16(extension, mFileName);
}
}

View File

@ -811,7 +811,7 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
message.AppendInt(mNetworkSelectionMode);
message.AppendLiteral(",0,\"");
message.Append(NS_ConvertUTF16toUTF8(mOperatorName));
message.AppendLiteral("\"");
message.Append('"');
SendLine(message.get());
} else if (msg.Find("AT+VTS=") != -1) {
ParseAtCommand(msg, 7, atCommandValues);
@ -1211,9 +1211,9 @@ BluetoothHfpManager::SendCLCC(const Call& aCall, int aIndex)
nsAutoCString message(RESPONSE_CLCC);
message.AppendInt(aIndex);
message.AppendLiteral(",");
message.Append(',');
message.AppendInt(aCall.mDirection);
message.AppendLiteral(",");
message.Append(',');
int status = 0;
switch (aCall.mState) {
@ -1290,7 +1290,7 @@ BluetoothHfpManager::SendCommand(const char* aCommand, uint32_t aValue)
}
message.AppendInt(aValue);
message.AppendLiteral(",");
message.Append(',');
message.AppendInt(sCINDItems[aValue].value);
} else if (!strcmp(aCommand, RESPONSE_CIND)) {
if (!aValue) {
@ -1300,9 +1300,9 @@ BluetoothHfpManager::SendCommand(const char* aCommand, uint32_t aValue)
message.Append(sCINDItems[i].name);
message.AppendLiteral("\",(");
message.Append(sCINDItems[i].range);
message.AppendLiteral(")");
message.Append(')');
if (i == (ArrayLength(sCINDItems) - 1)) {
message.AppendLiteral(")");
message.Append(')');
break;
}
message.AppendLiteral("),");
@ -1314,7 +1314,7 @@ BluetoothHfpManager::SendCommand(const char* aCommand, uint32_t aValue)
if (i == (ArrayLength(sCINDItems) - 1)) {
break;
}
message.AppendLiteral(",");
message.Append(',');
}
}
#ifdef MOZ_B2G_RIL

View File

@ -738,7 +738,7 @@ BluetoothOppManager::RetrieveSentFileName()
EmptyCString(),
extension);
if (NS_SUCCEEDED(rv)) {
mFileName.AppendLiteral(".");
mFileName.Append('.');
AppendUTF8toUTF16(extension, mFileName);
}
}

View File

@ -1195,7 +1195,7 @@ gfxFT2FontList::FindFonts()
bool moreFiles = handle != INVALID_HANDLE_VALUE;
while (moreFiles) {
nsAutoString filePath(path);
filePath.AppendLiteral("\\");
filePath.Append('\\');
filePath.Append(results.cFileName);
AppendFacesFromFontFile(NS_ConvertUTF16toUTF8(filePath));
moreFiles = FindNextFile(handle, &results);

View File

@ -386,7 +386,7 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
return NS_ERROR_UNEXPECTED;
}
authorityHeader = ci->GetHost();
authorityHeader.AppendLiteral(":");
authorityHeader.Append(':');
authorityHeader.AppendInt(ci->Port());
}

View File

@ -492,7 +492,7 @@ SpdyStream3::ParseHttpRequestHeaders(const char *buf,
}
nsAutoCString route;
route = ci->GetHost();
route.AppendLiteral(":");
route.Append(':');
route.AppendInt(ci->Port());
CompressToFrame(route);
}

View File

@ -498,7 +498,7 @@ SpdyStream31::ParseHttpRequestHeaders(const char *buf,
}
nsAutoCString route;
route = ci->GetHost();
route.AppendLiteral(":");
route.Append(':');
route.AppendInt(ci->Port());
CompressToFrame(route);
}

View File

@ -77,7 +77,7 @@ TriplesVisitor::Visit(nsIRDFNode *aSubject, nsIRDFResource *aPredicate,
const char16_t *value;
lit->GetValueConst(&value);
nsAutoCString object;
object.AppendLiteral("\"");
object.Append('"');
AppendUTF16toUTF8(value, object);
object.AppendLiteral("\" ");
uint32_t writeCount = object.Length();

View File

@ -1905,7 +1905,7 @@ static nsresult PrefSubmitReports(bool* aSubmitReports, bool writePref)
regKey->Create(nsIWindowsRegKey::ROOT_KEY_CURRENT_USER,
NS_ConvertUTF8toUTF16(regPath),
nsIWindowsRegKey::ACCESS_SET_VALUE);
regPath.AppendLiteral("\\");
regPath.Append('\\');
}
// Create appName key
@ -1913,7 +1913,7 @@ static nsresult PrefSubmitReports(bool* aSubmitReports, bool writePref)
regKey->Create(nsIWindowsRegKey::ROOT_KEY_CURRENT_USER,
NS_ConvertUTF8toUTF16(regPath),
nsIWindowsRegKey::ACCESS_SET_VALUE);
regPath.AppendLiteral("\\");
regPath.Append('\\');
// Create Crash Reporter key
regPath.AppendLiteral("Crash Reporter");

View File

@ -1071,7 +1071,7 @@ nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult)
rv = GetShellFolderPath(CSIDL_PROGRAM_FILES, programFiles);
NS_ENSURE_SUCCESS(rv, rv);
programFiles.AppendLiteral("\\");
programFiles.Append('\\');
uint32_t programFilesLen = programFiles.Length();
nsAutoString programName;

View File

@ -301,10 +301,10 @@ FrameworkView::PerformSearch(HString& aQuery)
}
nsAutoCString parameter;
parameter.AppendLiteral("\"");
parameter.Append('"');
unsigned int length;
parameter.Append(NS_ConvertUTF16toUTF8(aQuery.GetRawBuffer(&length)));
parameter.AppendLiteral("\"");
parameter.Append('"');
// NB: The first argument gets stripped by nsICommandLineRunner::Init,
// so it doesn't matter what we pass as the first argument, but we

View File

@ -193,7 +193,7 @@ GfxInfo::GetData()
note.Append(mVersion);
if (mHasTextureFromPixmap)
note.AppendLiteral(" -- texture_from_pixmap");
note.AppendLiteral("\n");
note.Append('\n');
#ifdef MOZ_CRASHREPORTER
CrashReporter::AppendAppNotesToCrashReport(note);
#endif

View File

@ -166,7 +166,7 @@ GetLibrarySaveToPath(int aFallbackFolderId, REFKNOWNFOLDERID aFolderId,
if (SUCCEEDED(savePath->GetDisplayName(SIGDN_FILESYSPATH, &str))) {
nsAutoString path;
path.Assign(str);
path.AppendLiteral("\\");
path.Append('\\');
nsresult rv =
NS_NewLocalFile(path, false, aFile);
CoTaskMemFree(str);