diff --git a/browser/components/shell/src/nsWindowsShellService.cpp b/browser/components/shell/src/nsWindowsShellService.cpp index d3bb673cb68c..1ff189039f03 100644 --- a/browser/components/shell/src/nsWindowsShellService.cpp +++ b/browser/components/shell/src/nsWindowsShellService.cpp @@ -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"); diff --git a/content/base/src/Element.cpp b/content/base/src/Element.cpp index 724146d59098..707419957de6 100644 --- a/content/base/src/Element.cpp +++ b/content/base/src/Element.cpp @@ -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 diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index 1cb4ea27e952..6e1c50e36e1d 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -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); diff --git a/dom/bluetooth2/bluedroid/BluetoothOppManager.cpp b/dom/bluetooth2/bluedroid/BluetoothOppManager.cpp index c55faf3d7a68..09d22a391f99 100644 --- a/dom/bluetooth2/bluedroid/BluetoothOppManager.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothOppManager.cpp @@ -716,7 +716,7 @@ BluetoothOppManager::RetrieveSentFileName() EmptyCString(), extension); if (NS_SUCCEEDED(rv)) { - mFileName.AppendLiteral("."); + mFileName.Append('.'); AppendUTF8toUTF16(extension, mFileName); } } diff --git a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp index 2d204e8ea066..c8c7095766f0 100644 --- a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp @@ -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 diff --git a/dom/bluetooth2/bluez/BluetoothOppManager.cpp b/dom/bluetooth2/bluez/BluetoothOppManager.cpp index 09b790875dc3..e1e4449fd725 100644 --- a/dom/bluetooth2/bluez/BluetoothOppManager.cpp +++ b/dom/bluetooth2/bluez/BluetoothOppManager.cpp @@ -738,7 +738,7 @@ BluetoothOppManager::RetrieveSentFileName() EmptyCString(), extension); if (NS_SUCCEEDED(rv)) { - mFileName.AppendLiteral("."); + mFileName.Append('.'); AppendUTF8toUTF16(extension, mFileName); } } diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index 536d6042ba2a..8f42163dd1cb 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -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); diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp index 2f9b8364ba39..43bc1e30c371 100644 --- a/netwerk/protocol/http/Http2Stream.cpp +++ b/netwerk/protocol/http/Http2Stream.cpp @@ -386,7 +386,7 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf, return NS_ERROR_UNEXPECTED; } authorityHeader = ci->GetHost(); - authorityHeader.AppendLiteral(":"); + authorityHeader.Append(':'); authorityHeader.AppendInt(ci->Port()); } diff --git a/netwerk/protocol/http/SpdyStream3.cpp b/netwerk/protocol/http/SpdyStream3.cpp index be9c5abb59c2..efc2b3e06668 100644 --- a/netwerk/protocol/http/SpdyStream3.cpp +++ b/netwerk/protocol/http/SpdyStream3.cpp @@ -492,7 +492,7 @@ SpdyStream3::ParseHttpRequestHeaders(const char *buf, } nsAutoCString route; route = ci->GetHost(); - route.AppendLiteral(":"); + route.Append(':'); route.AppendInt(ci->Port()); CompressToFrame(route); } diff --git a/netwerk/protocol/http/SpdyStream31.cpp b/netwerk/protocol/http/SpdyStream31.cpp index c1a3601f4dab..f8a32c8f2943 100644 --- a/netwerk/protocol/http/SpdyStream31.cpp +++ b/netwerk/protocol/http/SpdyStream31.cpp @@ -498,7 +498,7 @@ SpdyStream31::ParseHttpRequestHeaders(const char *buf, } nsAutoCString route; route = ci->GetHost(); - route.AppendLiteral(":"); + route.Append(':'); route.AppendInt(ci->Port()); CompressToFrame(route); } diff --git a/rdf/base/src/rdfTriplesSerializer.cpp b/rdf/base/src/rdfTriplesSerializer.cpp index 43a1d8e5e7a5..ff899afdc8bc 100644 --- a/rdf/base/src/rdfTriplesSerializer.cpp +++ b/rdf/base/src/rdfTriplesSerializer.cpp @@ -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(); diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 34e539827c39..e3f3254636e7 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -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"); diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index 8a509efa450c..c7b1fa0d87b8 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -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; diff --git a/widget/windows/winrt/MetroContracts.cpp b/widget/windows/winrt/MetroContracts.cpp index 1198d6895de5..60118eda54e3 100644 --- a/widget/windows/winrt/MetroContracts.cpp +++ b/widget/windows/winrt/MetroContracts.cpp @@ -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 diff --git a/widget/xpwidgets/GfxInfoX11.cpp b/widget/xpwidgets/GfxInfoX11.cpp index 7caf7f0cadee..fd441eb2fb89 100644 --- a/widget/xpwidgets/GfxInfoX11.cpp +++ b/widget/xpwidgets/GfxInfoX11.cpp @@ -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 diff --git a/xpcom/io/SpecialSystemDirectory.cpp b/xpcom/io/SpecialSystemDirectory.cpp index c2ec50f2f46b..939032f310ad 100644 --- a/xpcom/io/SpecialSystemDirectory.cpp +++ b/xpcom/io/SpecialSystemDirectory.cpp @@ -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);