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
Родитель cfd62b35ad
Коммит 085f40aff8
16 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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