From 016d46e5f336b822a6ddbda150131984dc32cea8 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Thu, 22 May 2014 06:48:51 +0300 Subject: [PATCH] Bug 869836 - Part 3: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan --- .../src/generic/FormControlAccessible.cpp | 2 +- accessible/src/xul/XULTreeGridAccessible.cpp | 2 +- caps/src/nsPrincipal.cpp | 2 +- content/base/src/FragmentOrElement.cpp | 4 +-- content/base/src/WebSocket.cpp | 2 +- content/base/src/nsContentAreaDragDrop.cpp | 2 +- .../src/SVGAnimatedPreserveAspectRatio.cpp | 2 +- .../xul/templates/src/nsXULContentBuilder.cpp | 2 +- .../xul/templates/src/nsXULSortService.cpp | 2 +- docshell/base/nsDSURIContentListener.cpp | 2 +- dom/base/nsJSTimeoutHandler.cpp | 6 ++-- dom/bindings/BindingUtils.cpp | 2 +- .../bluedroid/BluetoothOppManager.cpp | 2 +- dom/bluetooth/bluez/BluetoothHfpManager.cpp | 12 +++---- dom/bluetooth/bluez/BluetoothOppManager.cpp | 2 +- .../DeviceStorageRequestParent.cpp | 2 +- dom/devicestorage/nsDeviceStorage.cpp | 10 +++--- dom/events/WheelEvent.cpp | 6 ++-- dom/filesystem/DeviceStorageFileSystem.cpp | 2 +- dom/filesystem/FileSystemRequestParent.cpp | 2 +- dom/indexedDB/IDBKeyRange.h | 4 +-- dom/indexedDB/IndexedDatabaseInlines.h | 6 ++-- dom/ipc/ContentChild.cpp | 2 +- dom/ipc/ProcessPriorityManager.cpp | 2 +- dom/src/notification/Notification.cpp | 2 +- dom/src/storage/DOMStorageManager.cpp | 2 +- dom/workers/WorkerPrivate.cpp | 4 +-- dom/xslt/xpath/txUnionNodeTest.cpp | 4 +-- editor/libeditor/html/nsHTMLEditor.cpp | 2 +- gfx/src/nsRect.cpp | 4 +-- gfx/src/nsRegion.cpp | 4 +-- gfx/thebes/gfxFT2FontList.cpp | 2 +- gfx/thebes/gfxFont.cpp | 4 +-- gfx/thebes/gfxFontUtils.cpp | 2 +- gfx/thebes/gfxPangoFonts.cpp | 4 +-- gfx/thebes/gfxPlatform.cpp | 4 +-- ipc/glue/GeckoChildProcessHost.cpp | 4 +-- ipc/glue/WindowsMessageLoop.cpp | 2 +- js/xpconnect/loader/mozJSComponentLoader.cpp | 2 +- js/xpconnect/src/Sandbox.cpp | 4 +-- layout/base/nsDisplayList.cpp | 2 +- layout/style/AnimationCommon.cpp | 6 ++-- layout/style/Declaration.cpp | 4 +-- layout/style/StyleRule.cpp | 2 +- layout/style/nsAnimationManager.cpp | 2 +- layout/style/nsCSSRules.cpp | 24 +++++++------- layout/style/nsCSSStyleSheet.cpp | 6 ++-- layout/style/nsCSSValue.cpp | 32 +++++++++---------- layout/style/nsComputedDOMStyle.cpp | 28 ++++++++-------- layout/style/nsROCSSPrimitiveValue.cpp | 4 +-- layout/style/nsStyleUtil.cpp | 4 +-- layout/xul/nsBox.cpp | 2 +- layout/xul/tree/nsTreeContentView.cpp | 2 +- netwerk/base/src/Seer.cpp | 2 +- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 2 +- .../converters/mozTXTToHTMLConv.cpp | 2 +- .../streamconv/converters/nsIndexedToHTML.cpp | 4 +-- parser/htmlparser/src/nsParser.cpp | 6 ++-- .../ssl/src/SSLServerCertVerification.cpp | 2 +- .../manager/ssl/src/TransportSecurityInfo.cpp | 2 +- .../manager/ssl/src/nsCertOverrideService.cpp | 2 +- .../manager/ssl/src/nsClientAuthRemember.cpp | 2 +- security/manager/ssl/src/nsNSSCallbacks.cpp | 2 +- security/manager/ssl/src/nsNSSCertificate.cpp | 2 +- security/manager/ssl/src/nsNSSIOLayer.cpp | 6 ++-- security/manager/ssl/src/nsPK11TokenDB.cpp | 4 +-- security/manager/ssl/src/nsPKCS11Slot.cpp | 4 +-- storage/src/VacuumManager.cpp | 4 +-- storage/src/mozStorageService.cpp | 2 +- toolkit/components/places/History.cpp | 4 +-- toolkit/components/places/nsNavBookmarks.cpp | 2 +- toolkit/components/places/nsNavHistory.cpp | 14 ++++---- tools/profiler/IntelPowerGadget.cpp | 2 +- .../exthandler/win/nsOSHelperAppService.cpp | 2 +- widget/windows/nsTextStore.cpp | 2 +- widget/xpwidgets/GfxInfoX11.cpp | 2 +- widget/xpwidgets/nsPrintOptionsImpl.cpp | 2 +- xpcom/base/nsConsoleService.cpp | 2 +- xpcom/base/nsStatusReporterManager.cpp | 2 +- xpcom/base/nsTraceRefcnt.cpp | 2 +- 80 files changed, 167 insertions(+), 167 deletions(-) diff --git a/accessible/src/generic/FormControlAccessible.cpp b/accessible/src/generic/FormControlAccessible.cpp index 848ac6dadc7..fb5b6506f37 100644 --- a/accessible/src/generic/FormControlAccessible.cpp +++ b/accessible/src/generic/FormControlAccessible.cpp @@ -96,7 +96,7 @@ ProgressMeterAccessible::Value(nsString& aValue) (curValue / maxValue) * 100 : 100; aValue.AppendFloat(percentValue); - aValue.AppendLiteral("%"); + aValue.Append('%'); } template diff --git a/accessible/src/xul/XULTreeGridAccessible.cpp b/accessible/src/xul/XULTreeGridAccessible.cpp index 93855e066e1..f600adf96e7 100644 --- a/accessible/src/xul/XULTreeGridAccessible.cpp +++ b/accessible/src/xul/XULTreeGridAccessible.cpp @@ -302,7 +302,7 @@ XULTreeGridRowAccessible::Name(nsString& aName) nsCOMPtr column = nsCoreUtils::GetFirstSensibleColumn(mTree); while (column) { if (!aName.IsEmpty()) - aName.AppendLiteral(" "); + aName.Append(' '); nsAutoString cellName; GetCellName(column, cellName); diff --git a/caps/src/nsPrincipal.cpp b/caps/src/nsPrincipal.cpp index 46bd9d2b585..1f1ef425110 100644 --- a/caps/src/nsPrincipal.cpp +++ b/caps/src/nsPrincipal.cpp @@ -199,7 +199,7 @@ nsPrincipal::GetOriginForURI(nsIURI* aURI, char **aOrigin) if (NS_SUCCEEDED(rv) && !isChrome) { if (port != -1) { - hostPort.AppendLiteral(":"); + hostPort.Append(':'); hostPort.AppendInt(port, 10); } diff --git a/content/base/src/FragmentOrElement.cpp b/content/base/src/FragmentOrElement.cpp index 6524fdeff53..374e259738c 100644 --- a/content/base/src/FragmentOrElement.cpp +++ b/content/base/src/FragmentOrElement.cpp @@ -1763,7 +1763,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement) if (idAtom) { id.AppendLiteral(" id='"); id.Append(nsDependentAtomString(idAtom)); - id.AppendLiteral("'"); + id.Append('\''); } nsAutoString classes; @@ -1774,7 +1774,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement) classAttrValue->ToString(classString); classString.ReplaceChar(char16_t('\n'), char16_t(' ')); classes.Append(classString); - classes.AppendLiteral("'"); + classes.Append('\''); } nsAutoCString orphan; diff --git a/content/base/src/WebSocket.cpp b/content/base/src/WebSocket.cpp index 7607e1bb2dc..8e12c48f8ad 100644 --- a/content/base/src/WebSocket.cpp +++ b/content/base/src/WebSocket.cpp @@ -1019,7 +1019,7 @@ WebSocket::ParseURL(const nsString& aURL) mResource = filePath; if (!query.IsEmpty()) { - mResource.AppendLiteral("?"); + mResource.Append('?'); mResource.Append(query); } uint32_t length = mResource.Length(); diff --git a/content/base/src/nsContentAreaDragDrop.cpp b/content/base/src/nsContentAreaDragDrop.cpp index ecec7ea163a..259367d146c 100644 --- a/content/base/src/nsContentAreaDragDrop.cpp +++ b/content/base/src/nsContentAreaDragDrop.cpp @@ -728,7 +728,7 @@ DragDataProducer::AddStringsToDataTransfer(nsIContent* aDragNode, // a URL in the drag data if (!mUrlString.IsEmpty() && mIsAnchor) { nsAutoString dragData(mUrlString); - dragData.AppendLiteral("\n"); + dragData.Append('\n'); // Remove leading and trailing newlines in the title and replace them with // space in remaining positions - they confuse PlacesUtils::unwrapNodes // that expects url\ntitle formatted data for x-moz-url. diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp index ec0bd8e039e..01bd73dacd3 100644 --- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp @@ -224,7 +224,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString( if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) { - aValueAsString.AppendLiteral(" "); + aValueAsString.Append(' '); GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice); aValueAsString.Append(tmpString); } diff --git a/content/xul/templates/src/nsXULContentBuilder.cpp b/content/xul/templates/src/nsXULContentBuilder.cpp index af98b52492b..7802f50446a 100644 --- a/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/content/xul/templates/src/nsXULContentBuilder.cpp @@ -1843,7 +1843,7 @@ nsXULContentBuilder::InsertSortedNode(nsIContent* aContainer, mRoot->GetAttr(kNameSpaceID_None, nsGkAtoms::sort, sort); mRoot->GetAttr(kNameSpaceID_None, nsGkAtoms::sortDirection, sortDirection); mRoot->GetAttr(kNameSpaceID_None, nsGkAtoms::sorthints, sortHints); - sortDirection.AppendLiteral(" "); + sortDirection += ' '; sortDirection += sortHints; rv = XULSortServiceImpl::InitializeSortState(mRoot, aContainer, sort, sortDirection, &mSortState); diff --git a/content/xul/templates/src/nsXULSortService.cpp b/content/xul/templates/src/nsXULSortService.cpp index 246e64dd591..2113f813f0c 100644 --- a/content/xul/templates/src/nsXULSortService.cpp +++ b/content/xul/templates/src/nsXULSortService.cpp @@ -373,7 +373,7 @@ XULSortServiceImpl::InitializeSortState(nsIContent* aRootElement, if (!sortResource2.IsEmpty()) { nsCOMPtr sortkeyatom2 = do_GetAtom(sortResource2); aSortState->sortKeys.AppendObject(sortkeyatom2); - sort.AppendLiteral(" "); + sort.Append(' '); sort.Append(sortResource2); } } diff --git a/docshell/base/nsDSURIContentListener.cpp b/docshell/base/nsDSURIContentListener.cpp index 68cdd7ea288..4f183947041 100644 --- a/docshell/base/nsDSURIContentListener.cpp +++ b/docshell/base/nsDSURIContentListener.cpp @@ -507,7 +507,7 @@ nsDSURIContentListener::ReportXFOViolation(nsIDocShellTreeItem* aTopDocShellItem case eALLOWFROM: msg.AppendLiteral(" does not permit framing by "); msg.Append(NS_ConvertUTF8toUTF16(topURIString)); - msg.AppendLiteral("."); + msg.Append('.'); break; } diff --git a/dom/base/nsJSTimeoutHandler.cpp b/dom/base/nsJSTimeoutHandler.cpp index 6cf4a8a0724..dcfc1210977 100644 --- a/dom/base/nsJSTimeoutHandler.cpp +++ b/dom/base/nsJSTimeoutHandler.cpp @@ -100,15 +100,15 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsJSScriptTimeoutHandler) name.AppendLiteral(" ["); name.Append(funIdName); delete[] funIdName; - name.AppendLiteral("]"); + name.Append(']'); } } } else { name.AppendLiteral(" ["); name.Append(tmp->mFileName); - name.AppendLiteral(":"); + name.Append(':'); name.AppendInt(tmp->mLineNo); - name.AppendLiteral("]"); + name.Append(']'); } cb.DescribeRefCountedNode(tmp->mRefCnt.get(), name.get()); } diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp index a6f091290fb..70372b92ccf 100644 --- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -372,7 +372,7 @@ InterfaceObjectToString(JSContext* cx, unsigned argc, JS::Value *vp) str.Append('\n'); str.AppendLiteral(" [native code]"); str.Append('\n'); - str.AppendLiteral("}"); + str.Append('}'); return xpc::NonVoidStringToJsval(cx, str, args.rval()); } diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp index c55faf3d7a6..09d22a391f9 100644 --- a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp +++ b/dom/bluetooth/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/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index d096d628cdd..faaf004dff3 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -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/bluetooth/bluez/BluetoothOppManager.cpp b/dom/bluetooth/bluez/BluetoothOppManager.cpp index 09b790875dc..e1e4449fd72 100644 --- a/dom/bluetooth/bluez/BluetoothOppManager.cpp +++ b/dom/bluetooth/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/dom/devicestorage/DeviceStorageRequestParent.cpp b/dom/devicestorage/DeviceStorageRequestParent.cpp index 77311249b45..10e2c03b2b9 100644 --- a/dom/devicestorage/DeviceStorageRequestParent.cpp +++ b/dom/devicestorage/DeviceStorageRequestParent.cpp @@ -359,7 +359,7 @@ DeviceStorageRequestParent::EnsureRequiredPermissions( return false; } - permissionName.AppendLiteral("-"); + permissionName.Append('-'); permissionName.Append(access); if (!AssertAppProcessPermission(aParent, permissionName.get())) { diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 9828ab671b8..f53a36b3ab2 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -317,7 +317,7 @@ DeviceStorageTypeChecker::Check(const nsAString& aType, nsIFile* aFile) nsAutoString extensionMatch; extensionMatch.AssignLiteral("*"); extensionMatch.Append(Substring(path, dotIdx)); - extensionMatch.AppendLiteral(";"); + extensionMatch.Append(';'); if (aType.EqualsLiteral(DEVICESTORAGE_PICTURES)) { return CaseInsensitiveFindInReadable(extensionMatch, mPicturesExtensions); @@ -360,7 +360,7 @@ DeviceStorageTypeChecker::GetTypeFromFileName(const nsAString& aFileName, nsAutoString extensionMatch; extensionMatch.AssignLiteral("*"); extensionMatch.Append(Substring(aFileName, dotIdx)); - extensionMatch.AppendLiteral(";"); + extensionMatch.Append(';'); if (CaseInsensitiveFindInReadable(extensionMatch, mPicturesExtensions)) { aType.AssignLiteral(DEVICESTORAGE_PICTURES); @@ -802,13 +802,13 @@ DeviceStorageFile::GetFullPath(nsAString &aFullPath) { aFullPath.Truncate(); if (!mStorageName.EqualsLiteral("")) { - aFullPath.AppendLiteral("/"); + aFullPath.Append('/'); aFullPath.Append(mStorageName); - aFullPath.AppendLiteral("/"); + aFullPath.Append('/'); } if (!mRootDir.EqualsLiteral("")) { aFullPath.Append(mRootDir); - aFullPath.AppendLiteral("/"); + aFullPath.Append('/'); } aFullPath.Append(mPath); } diff --git a/dom/events/WheelEvent.cpp b/dom/events/WheelEvent.cpp index ac3b4ffd460..68105e96587 100644 --- a/dom/events/WheelEvent.cpp +++ b/dom/events/WheelEvent.cpp @@ -157,19 +157,19 @@ GetModifierList(bool aCtrl, bool aShift, bool aAlt, bool aMeta, } if (aShift) { if (!aModifierList.IsEmpty()) { - aModifierList.AppendLiteral(" "); + aModifierList.Append(' '); } aModifierList.AppendLiteral(NS_DOM_KEYNAME_SHIFT); } if (aAlt) { if (!aModifierList.IsEmpty()) { - aModifierList.AppendLiteral(" "); + aModifierList.Append(' '); } aModifierList.AppendLiteral(NS_DOM_KEYNAME_ALT); } if (aMeta) { if (!aModifierList.IsEmpty()) { - aModifierList.AppendLiteral(" "); + aModifierList.Append(' '); } aModifierList.AppendLiteral(NS_DOM_KEYNAME_META); } diff --git a/dom/filesystem/DeviceStorageFileSystem.cpp b/dom/filesystem/DeviceStorageFileSystem.cpp index 267f80e7266..a9251f04b8a 100644 --- a/dom/filesystem/DeviceStorageFileSystem.cpp +++ b/dom/filesystem/DeviceStorageFileSystem.cpp @@ -33,7 +33,7 @@ DeviceStorageFileSystem::DeviceStorageFileSystem( // Generate the string representation of the file system. mString.AppendLiteral("devicestorage-"); mString.Append(mStorageType); - mString.AppendLiteral("-"); + mString.Append('-'); mString.Append(mStorageName); mIsTesting = diff --git a/dom/filesystem/FileSystemRequestParent.cpp b/dom/filesystem/FileSystemRequestParent.cpp index 845d6e40c19..693474810f1 100644 --- a/dom/filesystem/FileSystemRequestParent.cpp +++ b/dom/filesystem/FileSystemRequestParent.cpp @@ -64,7 +64,7 @@ FileSystemRequestParent::Dispatch(ContentParent* aParent, nsAutoCString permissionName; permissionName = mFileSystem->GetPermission(); - permissionName.AppendLiteral("-"); + permissionName.Append('-'); permissionName.Append(access); if (!AssertAppProcessPermission(aParent, permissionName.get())) { diff --git a/dom/indexedDB/IDBKeyRange.h b/dom/indexedDB/IDBKeyRange.h index 0e8011c3c30..22a06024c72 100644 --- a/dom/indexedDB/IDBKeyRange.h +++ b/dom/indexedDB/IDBKeyRange.h @@ -99,7 +99,7 @@ public: clause.Append(andStr + aKeyColumnName); clause.AppendLiteral(" >"); if (!IsLowerOpen()) { - clause.AppendLiteral("="); + clause.Append('='); } clause.Append(spacecolon + lowerKey); } @@ -109,7 +109,7 @@ public: clause.Append(andStr + aKeyColumnName); clause.AppendLiteral(" <"); if (!IsUpperOpen()) { - clause.AppendLiteral("="); + clause.Append('='); } clause.Append(spacecolon + NS_LITERAL_CSTRING("upper_key")); } diff --git a/dom/indexedDB/IndexedDatabaseInlines.h b/dom/indexedDB/IndexedDatabaseInlines.h index 25ecfa6fa95..b856af67d55 100644 --- a/dom/indexedDB/IndexedDatabaseInlines.h +++ b/dom/indexedDB/IndexedDatabaseInlines.h @@ -94,14 +94,14 @@ AppendConditionClause(const nsACString& aColumnName, NS_LITERAL_CSTRING(" "); if (aLessThan) { - aResult.AppendLiteral("<"); + aResult.Append('<'); } else { - aResult.AppendLiteral(">"); + aResult.Append('>'); } if (aEquals) { - aResult.AppendLiteral("="); + aResult.Append('='); } aResult += NS_LITERAL_CSTRING(" :") + aArgName; diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index ccd2ba4847e..47de3841d9d 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -617,7 +617,7 @@ ContentChild::GetProcessName(nsACString& aName) ContentChild::AppendProcessId(nsACString& aName) { if (!aName.IsEmpty()) { - aName.AppendLiteral(" "); + aName.Append(' '); } unsigned pid = getpid(); aName.Append(nsPrintfCString("(pid %u)", pid)); diff --git a/dom/ipc/ProcessPriorityManager.cpp b/dom/ipc/ProcessPriorityManager.cpp index 2c021bdfeaa..4e4f7897682 100644 --- a/dom/ipc/ProcessPriorityManager.cpp +++ b/dom/ipc/ProcessPriorityManager.cpp @@ -1181,7 +1181,7 @@ ParticularProcessPriorityManager::FireTestOnlyObserverNotification( nsAutoCString data(nsPrintfCString("%lld", ChildID())); if (!aData.IsEmpty()) { - data.AppendLiteral(":"); + data.Append(':'); data.Append(aData); } diff --git a/dom/src/notification/Notification.cpp b/dom/src/notification/Notification.cpp index e1d2af25f21..e9c479ce8c2 100644 --- a/dom/src/notification/Notification.cpp +++ b/dom/src/notification/Notification.cpp @@ -429,7 +429,7 @@ Notification::Notification(const nsAString& aID, const nsAString& aTitle, const // Get the notification name that is unique per origin + tag/ID. // The name of the alert is of the form origin#tag/ID. - alertName.AppendLiteral("#"); + alertName.Append('#'); if (!mTag.IsEmpty()) { alertName.AppendLiteral("tag:"); alertName.Append(mTag); diff --git a/dom/src/storage/DOMStorageManager.cpp b/dom/src/storage/DOMStorageManager.cpp index d8d3585a10d..8a0daf44568 100644 --- a/dom/src/storage/DOMStorageManager.cpp +++ b/dom/src/storage/DOMStorageManager.cpp @@ -76,7 +76,7 @@ CreateReversedDomain(const nsACString& aAsciiDomain, ReverseString(aAsciiDomain, aKey); - aKey.AppendLiteral("."); + aKey.Append('.'); return NS_OK; } diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 9871c76d13a..08ddaf3a7f1 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -3390,7 +3390,7 @@ WorkerPrivateParent::SetBaseURI(nsIURI* aBaseURI) } if (NS_SUCCEEDED(aBaseURI->GetScheme(mLocationInfo.mProtocol))) { - mLocationInfo.mProtocol.AppendLiteral(":"); + mLocationInfo.mProtocol.Append(':'); } else { mLocationInfo.mProtocol.Truncate(); @@ -3401,7 +3401,7 @@ WorkerPrivateParent::SetBaseURI(nsIURI* aBaseURI) mLocationInfo.mPort.AppendInt(port); nsAutoCString host(mLocationInfo.mHostname); - host.AppendLiteral(":"); + host.Append(':'); host.Append(mLocationInfo.mPort); mLocationInfo.mHost.Assign(host); diff --git a/dom/xslt/xpath/txUnionNodeTest.cpp b/dom/xslt/xpath/txUnionNodeTest.cpp index 59a7832b644..421ea680c0a 100644 --- a/dom/xslt/xpath/txUnionNodeTest.cpp +++ b/dom/xslt/xpath/txUnionNodeTest.cpp @@ -48,13 +48,13 @@ txUnionNodeTest::isSensitiveTo(Expr::ContextSensitivity aContext) void txUnionNodeTest::toString(nsAString& aDest) { - aDest.AppendLiteral("("); + aDest.Append('('); for (uint32_t i = 0; i < mNodeTests.Length(); ++i) { if (i != 0) { aDest.AppendLiteral(" | "); } mNodeTests[i]->toString(aDest); } - aDest.AppendLiteral(")"); + aDest.Append(')'); } #endif diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index ebe32d544d6..450f8a6afeb 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -4574,7 +4574,7 @@ nsHTMLEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement, bool wasSet = false; res = GetAttributeValue(aElement, NS_LITERAL_STRING("style"), existingValue, &wasSet); NS_ENSURE_SUCCESS(res, res); - existingValue.AppendLiteral(" "); + existingValue.Append(' '); existingValue.Append(aValue); if (aSuppressTransaction) res = aElement->SetAttribute(aAttribute, existingValue); diff --git a/gfx/src/nsRect.cpp b/gfx/src/nsRect.cpp index 71f0c71d853..41a03150394 100644 --- a/gfx/src/nsRect.cpp +++ b/gfx/src/nsRect.cpp @@ -23,7 +23,7 @@ FILE* operator<<(FILE* out, const nsRect& rect) nsAutoString tmp; // Output the coordinates in fractional pixels so they're easier to read - tmp.AppendLiteral("{"); + tmp.Append('{'); tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.x, nsDeviceContext::AppUnitsPerCSSPixel())); tmp.AppendLiteral(", "); @@ -35,7 +35,7 @@ FILE* operator<<(FILE* out, const nsRect& rect) tmp.AppendLiteral(", "); tmp.AppendFloat(NSAppUnitsToFloatPixels(rect.height, nsDeviceContext::AppUnitsPerCSSPixel())); - tmp.AppendLiteral("}"); + tmp.Append('}'); fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out); return out; } diff --git a/gfx/src/nsRegion.cpp b/gfx/src/nsRegion.cpp index c67d2160c4a..77c4aa106f4 100644 --- a/gfx/src/nsRegion.cpp +++ b/gfx/src/nsRegion.cpp @@ -925,7 +925,7 @@ nsRect nsRegion::GetLargestRectangle (const nsRect& aContainingRect) const { nsCString nsRegion::ToString() const { nsCString result; - result.AppendLiteral("["); + result.Append('['); int n; pixman_box32_t *boxes = pixman_region32_rectangles(const_cast(&mImpl), &n); @@ -936,7 +936,7 @@ nsRegion::ToString() const { result.Append(nsPrintfCString("%d,%d,%d,%d", boxes[i].x1, boxes[i].y1, boxes[i].x2, boxes[i].y2)); } - result.AppendLiteral("]"); + result.Append(']'); return result; } diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index ea12020312f..d2e3ee082b1 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -430,7 +430,7 @@ CreateNamedFontEntry(FT_Face aFace, const char* aFilename, uint8_t aIndex) nsAutoString fontName; AppendUTF8toUTF16(aFace->family_name, fontName); if (aFace->style_name && strcmp("Regular", aFace->style_name)) { - fontName.AppendLiteral(" "); + fontName.Append(' '); AppendUTF8toUTF16(aFace->style_name, fontName); } return FT2FontEntry::CreateFontEntry(aFace, aFilename, aIndex, fontName); diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index db924d0349b..b320c86a7a0 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -4864,7 +4864,7 @@ gfxFontGroup::ForEachFontInternal(const nsAString& aFamilies, nsAutoCString prefName("font.name."); prefName.Append(lcFamily); - prefName.AppendLiteral("."); + prefName.Append('.'); prefName.Append(groupString); nsAdoptingString value = Preferences::GetString(prefName.get()); @@ -4924,7 +4924,7 @@ gfxFontGroup::ForEachFontInternal(const nsAString& aFamilies, if (generic && aResolveGeneric) { nsAutoCString prefName("font.name-list."); prefName.Append(lcFamily); - prefName.AppendLiteral("."); + prefName.Append('.'); prefName.Append(groupString); nsAdoptingString value = Preferences::GetString(prefName.get()); if (value) { diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index d928e832e6d..340d6e4512c 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -1066,7 +1066,7 @@ gfxFontUtils::GetFullNameFromTable(hb_blob_t *aNameTable, gfxFontUtils::NAME_ID_STYLE, styleName); if (NS_SUCCEEDED(rv) && !styleName.IsEmpty()) { - name.AppendLiteral(" "); + name.Append(' '); name.Append(styleName); aFullName = name; } diff --git a/gfx/thebes/gfxPangoFonts.cpp b/gfx/thebes/gfxPangoFonts.cpp index d1f0a54a356..98b1a199a62 100644 --- a/gfx/thebes/gfxPangoFonts.cpp +++ b/gfx/thebes/gfxPangoFonts.cpp @@ -154,7 +154,7 @@ gfxFcFontEntry::RealFaceName() NS_ConvertUTF8toUTF16 result((const char*)name); if (FcPatternGetString(mPatterns[0], FC_STYLE, 0, &name) == FcResultMatch) { - result.AppendLiteral(" "); + result.Append(' '); AppendUTF8toUTF16((const char*)name, result); } return result; @@ -1815,7 +1815,7 @@ gfxFcFont::GetOrMakeFont(FcPattern *aRequestedPattern, FcPattern *aFontPattern, AppendUTF8toUTF16(gfxFontconfigUtils::ToCString(fc_file), name); if (index != 0) { - name.AppendLiteral("/"); + name.Append('/'); name.AppendInt(index); } } diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index a02b547a7ff..4058d7a8c23 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1179,7 +1179,7 @@ AppendGenericFontFromPref(nsString& aFonts, nsIAtom *aLangGroup, const char *aGe genericDotLang = Preferences::GetCString(prefName.get()); } - genericDotLang.AppendLiteral("."); + genericDotLang.Append('.'); genericDotLang.Append(langGroupString); // fetch font.name.xxx value @@ -1229,7 +1229,7 @@ bool gfxPlatform::ForEachPrefFont(eFontPrefLang aLangArray[], uint32_t aLangArra prefName.Append(langGroup); nsAdoptingCString genericDotLang = Preferences::GetCString(prefName.get()); - genericDotLang.AppendLiteral("."); + genericDotLang.Append('.'); genericDotLang.Append(langGroup); // fetch font.name.xxx value diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index c8313d5fa48..0a1ded0a3e2 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -568,7 +568,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt nsCString new_ld_lib_path; if (ld_library_path && *ld_library_path) { new_ld_lib_path.Assign(path.get()); - new_ld_lib_path.AppendLiteral(":"); + new_ld_lib_path.Append(':'); new_ld_lib_path.Append(ld_library_path); newEnvVars["LD_LIBRARY_PATH"] = new_ld_lib_path.get(); } else { @@ -590,7 +590,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt nsCString interpose; if (prevInterpose) { interpose.Assign(prevInterpose); - interpose.AppendLiteral(":"); + interpose.Append(':'); } interpose.Append(path.get()); interpose.AppendLiteral("/libplugin_child_interpose.dylib"); diff --git a/ipc/glue/WindowsMessageLoop.cpp b/ipc/glue/WindowsMessageLoop.cpp index f40dfbab90e..5970133c1ad 100644 --- a/ipc/glue/WindowsMessageLoop.cpp +++ b/ipc/glue/WindowsMessageLoop.cpp @@ -306,7 +306,7 @@ ProcessOrDeferMessage(HWND hwnd, if (GetClassNameW(hwnd, className, sizeof(className) - 1) > 0) { log.AppendLiteral(" (\""); log.Append(NS_ConvertUTF16toUTF8((char16_t*)className)); - log.AppendLiteral("\")"); + log.Append('\')"); } log.AppendLiteral(", sending it to DefWindowProc instead of the normal " diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index 9bfe1eab517..67c7ccbba6a 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -1389,7 +1389,7 @@ mozJSComponentLoader::ImportInto(const nsACString &aLocation, JSAutoByteString bytes(mContext, JSID_TO_STRING(symbolId)); if (!!bytes) logBuffer.Append(bytes.ptr()); - logBuffer.AppendLiteral(" "); + logBuffer.Append(' '); if (i == symbolCount - 1) { LOG(("%s] from %s\n", logBuffer.get(), PromiseFlatCString(aLocation).get())); diff --git a/js/xpconnect/src/Sandbox.cpp b/js/xpconnect/src/Sandbox.cpp index 95fc51e6458..d1b69ee2596 100644 --- a/js/xpconnect/src/Sandbox.cpp +++ b/js/xpconnect/src/Sandbox.cpp @@ -1539,9 +1539,9 @@ AssembleSandboxMemoryReporterName(JSContext *cx, nsCString &sandboxName) sandboxName.AppendLiteral(" (from: "); sandboxName.Append(NS_ConvertUTF16toUTF8(location)); - sandboxName.AppendLiteral(":"); + sandboxName.Append(':'); sandboxName.AppendInt(lineNumber); - sandboxName.AppendLiteral(")"); + sandboxName.Append(')'); } return NS_OK; diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 9299946aee2..9536d0aea0f 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -4712,7 +4712,7 @@ nsDisplayTransform::ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBui message.AppendInt(nsPresContext::AppUnitsToIntCSSPixels(refSize.width)); message.AppendLiteral(", "); message.AppendInt(nsPresContext::AppUnitsToIntCSSPixels(refSize.height)); - message.AppendLiteral(")"); + message.Append(')'); CommonElementAnimationData::LogAsyncAnimationFailure(message, aFrame->GetContent()); } diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index e403b43874d..8d18310501e 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -472,11 +472,11 @@ CommonElementAnimationData::LogAsyncAnimationFailure(nsCString& aMessage, if (id) { aMessage.AppendLiteral(" with id '"); aMessage.Append(nsAtomCString(aContent->GetID())); - aMessage.AppendLiteral("'"); + aMessage.Append('\''); } - aMessage.AppendLiteral("]"); + aMessage.Append(']'); } - aMessage.AppendLiteral("\n"); + aMessage.Append('\n'); printf_stderr(aMessage.get()); } diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index 82df493c380..90b427141ed 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -1068,10 +1068,10 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, } else if (unit == eCSSUnit_List || unit == eCSSUnit_ListDep) { // Non-empty - aValue.AppendLiteral("("); + aValue.Append('('); rowsItem->mValue.AppendToString(eCSSProperty_grid_template_rows, aValue, aSerialization); - aValue.AppendLiteral(")"); + aValue.Append(')'); } else { nsStyleUtil::AppendEscapedCSSString(areas->mTemplates[row++], aValue); diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index 8d7b997bc29..c62c93486fe 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -1456,7 +1456,7 @@ StyleRule::List(FILE* out, int32_t aIndent) const if (mSelector) mSelector->ToString(buffer, GetStyleSheet()); - buffer.AppendLiteral(" "); + buffer.Append(' '); fputs(NS_LossyConvertUTF16toASCII(buffer).get(), out); if (nullptr != mDeclaration) { mDeclaration->List(out); diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp index cbcc62073b2..3783ce9a4a9 100644 --- a/layout/style/nsAnimationManager.cpp +++ b/layout/style/nsAnimationManager.cpp @@ -352,7 +352,7 @@ ElementAnimations::CanPerformOnCompositorThread(CanAnimateFlags aFlags) const nsCString message; message.AppendLiteral("Gecko bug: Async animation of pseudoelements not supported. See bug 771367 ("); message.Append(nsAtomCString(mElementProperty)); - message.AppendLiteral(")"); + message.Append(')'); LogAsyncAnimationFailure(message, mElement); } return false; diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp index 85f99ae8145..3808a1a903c 100644 --- a/layout/style/nsCSSRules.cpp +++ b/layout/style/nsCSSRules.cpp @@ -433,11 +433,11 @@ ImportRule::GetCssText(nsAString& aCssText) nsAutoString mediaText; mMedia->GetText(mediaText); if (!mediaText.IsEmpty()) { - aCssText.AppendLiteral(" "); + aCssText.Append(' '); aCssText.Append(mediaText); } } - aCssText.AppendLiteral(";"); + aCssText.Append(';'); return NS_OK; } @@ -693,7 +693,7 @@ GroupRule::AppendRulesToCssText(nsAString& aCssText) } } - aCssText.AppendLiteral("}"); + aCssText.Append('}'); } // nsIDOMCSSMediaRule or nsIDOMCSSMozDocumentRule methods @@ -1376,12 +1376,12 @@ AppendSerializedFontSrc(const nsCSSValue& src, nsAString & aResult) aResult.AppendLiteral("url("); nsDependentString url(sources[i].GetOriginalURLValue()); nsStyleUtil::AppendEscapedCSSString(url, aResult); - aResult.AppendLiteral(")"); + aResult.Append(')'); } else if (sources[i].GetUnit() == eCSSUnit_Local_Font) { aResult.AppendLiteral("local("); nsDependentString local(sources[i].GetStringBufferValue()); nsStyleUtil::AppendEscapedCSSString(local, aResult); - aResult.AppendLiteral(")"); + aResult.Append(')'); } else { NS_NOTREACHED("entry in src: descriptor with improper unit"); i++; @@ -1961,18 +1961,18 @@ FeatureValuesToString( // for each ident-values tuple uint32_t j, numValues = fv.valuelist.Length(); for (j = 0; j < numValues; j++) { - aOutStr.AppendLiteral(" "); + aOutStr.Append(' '); const gfxFontFeatureValueSet::ValueList& vlist = fv.valuelist[j]; nsStyleUtil::AppendEscapedCSSIdent(vlist.name, aOutStr); - aOutStr.AppendLiteral(":"); + aOutStr.Append(':'); uint32_t k, numSelectors = vlist.featureSelectors.Length(); for (k = 0; k < numSelectors; k++) { - aOutStr.AppendLiteral(" "); + aOutStr.Append(' '); aOutStr.AppendInt(vlist.featureSelectors[k]); } - aOutStr.AppendLiteral(";"); + aOutStr.Append(';'); } aOutStr.AppendLiteral(" }\n"); } @@ -1991,7 +1991,7 @@ FontFeatureValuesRuleToString( aOutStr.AppendLiteral(" {\n"); FeatureValuesToString(aFeatureValues, valueTextStr); aOutStr.Append(valueTextStr); - aOutStr.AppendLiteral("}"); + aOutStr.Append('}'); } #ifdef DEBUG @@ -2515,9 +2515,9 @@ nsCSSKeyframesRule::GetCssText(nsAString& aCssText) for (uint32_t i = 0, i_end = mRules.Count(); i != i_end; ++i) { static_cast(mRules[i])->GetCssText(tmp); aCssText.Append(tmp); - aCssText.AppendLiteral("\n"); + aCssText.Append('\n'); } - aCssText.AppendLiteral("}"); + aCssText.Append('}'); return NS_OK; } diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp index 36620fb13c1..041594f62fb 100644 --- a/layout/style/nsCSSStyleSheet.cpp +++ b/layout/style/nsCSSStyleSheet.cpp @@ -353,7 +353,7 @@ nsMediaQuery::AppendToString(nsAString& aString) const for (uint32_t i = 0, i_end = mExpressions.Length(); i < i_end; ++i) { if (i > 0 || !mTypeOmitted) aString.AppendLiteral(" and "); - aString.AppendLiteral("("); + aString.Append('('); const nsMediaExpression &expr = mExpressions[i]; if (expr.mRange == nsMediaExpression::eMin) { @@ -406,7 +406,7 @@ nsMediaQuery::AppendToString(nsAString& aString) const "bad unit"); array->Item(0).AppendToString(eCSSProperty_z_index, aString, nsCSSValue::eNormalized); - aString.AppendLiteral("/"); + aString.Append('/'); array->Item(1).AppendToString(eCSSProperty_z_index, aString, nsCSSValue::eNormalized); } @@ -441,7 +441,7 @@ nsMediaQuery::AppendToString(nsAString& aString) const } } - aString.AppendLiteral(")"); + aString.Append(')'); } } diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index aa7770f03cb..31eb78fe057 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -847,7 +847,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, if (mark && array->Item(i).GetUnit() != eCSSUnit_Null) { if (unit == eCSSUnit_Array && eCSSProperty_transition_timing_function != aProperty) - aResult.AppendLiteral(" "); + aResult.Append(' '); else aResult.AppendLiteral(", "); } @@ -877,7 +877,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, } if (eCSSUnit_Array == unit && aProperty == eCSSProperty_transition_timing_function) { - aResult.AppendLiteral(")"); + aResult.Append(')'); } } /* Although Function is backed by an Array, we'll handle it separately @@ -925,7 +925,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, } else { MOZ_ASSERT(false, "should no longer have non-enumerated functions"); } - aResult.AppendLiteral("("); + aResult.Append('('); /* Now, step through the function contents, writing each of them as we go. */ for (size_t index = 1; index < array->Count(); ++index) { @@ -938,7 +938,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, } /* Finally, append the closing parenthesis. */ - aResult.AppendLiteral(")"); + aResult.Append(')'); } else if (IsCalcUnit()) { NS_ABORT_IF_FALSE(GetUnit() == eCSSUnit_Calc, "unexpected unit"); @@ -1172,7 +1172,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, if (gradient->GetRadialSize().GetUnit() != eCSSUnit_None) { if (needSep) { - aResult.AppendLiteral(" "); + aResult.Append(' '); } NS_ABORT_IF_FALSE(gradient->GetRadialSize().GetUnit() == eCSSUnit_Enumerated, @@ -1189,7 +1189,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, gradient->GetRadiusX().AppendToString(aProperty, aResult, aSerialization); if (gradient->GetRadiusY().GetUnit() != eCSSUnit_None) { - aResult.AppendLiteral(" "); + aResult.Append(' '); gradient->GetRadiusY().AppendToString(aProperty, aResult, aSerialization); } @@ -1205,12 +1205,12 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, "unexpected unit"); aResult.AppendLiteral("to"); if (!(gradient->mBgPos.mXValue.GetIntValue() & NS_STYLE_BG_POSITION_CENTER)) { - aResult.AppendLiteral(" "); + aResult.Append(' '); gradient->mBgPos.mXValue.AppendToString(eCSSProperty_background_position, aResult, aSerialization); } if (!(gradient->mBgPos.mYValue.GetIntValue() & NS_STYLE_BG_POSITION_CENTER)) { - aResult.AppendLiteral(" "); + aResult.Append(' '); gradient->mBgPos.mYValue.AppendToString(eCSSProperty_background_position, aResult, aSerialization); } @@ -1223,7 +1223,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, gradient->mBgPos.mYValue.GetUnit() != eCSSUnit_None || gradient->mAngle.GetUnit() != eCSSUnit_None) { if (needSep) { - aResult.AppendLiteral(" "); + aResult.Append(' '); } if (gradient->mIsRadial && !gradient->mIsLegacySyntax) { aResult.AppendLiteral("at "); @@ -1231,12 +1231,12 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, if (gradient->mBgPos.mXValue.GetUnit() != eCSSUnit_None) { gradient->mBgPos.mXValue.AppendToString(eCSSProperty_background_position, aResult, aSerialization); - aResult.AppendLiteral(" "); + aResult.Append(' '); } if (gradient->mBgPos.mXValue.GetUnit() != eCSSUnit_None) { gradient->mBgPos.mYValue.AppendToString(eCSSProperty_background_position, aResult, aSerialization); - aResult.AppendLiteral(" "); + aResult.Append(' '); } if (gradient->mAngle.GetUnit() != eCSSUnit_None) { NS_ABORT_IF_FALSE(gradient->mIsLegacySyntax, @@ -1263,7 +1263,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, AppendASCIItoUTF16(nsCSSProps::ValueToKeyword(intValue, nsCSSProps::kRadialGradientShapeKTable), aResult); - aResult.AppendLiteral(" "); + aResult.Append(' '); } if (gradient->GetRadialSize().GetUnit() != eCSSUnit_None) { @@ -1285,7 +1285,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, gradient->mStops[i].mColor.AppendToString(aProperty, aResult, aSerialization); if (gradient->mStops[i].mLocation.GetUnit() != eCSSUnit_None) { - aResult.AppendLiteral(" "); + aResult.Append(' '); gradient->mStops[i].mLocation.AppendToString(aProperty, aResult, aSerialization); } @@ -1295,7 +1295,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult, aResult.AppendLiteral(", "); } - aResult.AppendLiteral(")"); + aResult.Append(')'); } else if (eCSSUnit_TokenStream == unit) { nsCSSProperty shorthand = mValue.mTokenStream->mShorthandPropertyID; if (shorthand == eCSSProperty_UNKNOWN || @@ -1695,10 +1695,10 @@ AppendGridTemplateToString(const nsCSSValueList* val, } else if (unit == eCSSUnit_List || unit == eCSSUnit_ListDep) { // Non-empty - aResult.AppendLiteral("("); + aResult.Append('('); AppendValueListToString(val->mValue.GetListValue(), aProperty, aResult, aSerialization); - aResult.AppendLiteral(")"); + aResult.Append(')'); } else { // diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index aeb1a759e2b..24e2bee3a03 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1796,7 +1796,7 @@ SetValueToCalc(const nsStyleCoord::Calc *aCalc, nsROCSSPrimitiveValue *aValue) result.Append(tmp); } - result.AppendLiteral(")"); + result.Append(')'); aValue->SetString(result); // not really SetString } @@ -1883,7 +1883,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, } if (aGradient->mSize != NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER) { if (needSep) { - aString.AppendLiteral(" "); + aString.Append(' '); } AppendASCIItoUTF16(nsCSSProps:: ValueToKeyword(aGradient->mSize, @@ -1894,7 +1894,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, } else { AppendCSSGradientLength(aGradient->mRadiusX, tmpVal, aString); if (aGradient->mShape != NS_STYLE_GRADIENT_SHAPE_CIRCULAR) { - aString.AppendLiteral(" "); + aString.Append(' '); AppendCSSGradientLength(aGradient->mRadiusY, tmpVal, aString); } needSep = true; @@ -1910,14 +1910,14 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, aGradient->mBgPosY.GetPercentValue() != (isRadial ? 0.5f : 1.0f)) { if (isRadial && !aGradient->mLegacySyntax) { if (needSep) { - aString.AppendLiteral(" "); + aString.Append(' '); } aString.AppendLiteral("at "); needSep = false; } AppendCSSGradientLength(aGradient->mBgPosX, tmpVal, aString); if (aGradient->mBgPosY.GetUnit() != eStyleUnit_None) { - aString.AppendLiteral(" "); + aString.Append(' '); AppendCSSGradientLength(aGradient->mBgPosY, tmpVal, aString); } needSep = true; @@ -1926,7 +1926,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, if (aGradient->mAngle.GetUnit() != eStyleUnit_None) { MOZ_ASSERT(!isRadial || aGradient->mLegacySyntax); if (needSep) { - aString.AppendLiteral(" "); + aString.Append(' '); } nsStyleUtil::AppendAngleValue(aGradient->mAngle, aString); needSep = true; @@ -1946,7 +1946,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, } if (aGradient->mSize != NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER) { if (needSep) { - aString.AppendLiteral(" "); + aString.Append(' '); } AppendASCIItoUTF16(nsCSSProps:: ValueToKeyword(aGradient->mSize, @@ -1967,14 +1967,14 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient, aString.Append(tokenString); if (aGradient->mStops[i].mLocation.GetUnit() != eStyleUnit_None) { - aString.AppendLiteral(" "); + aString.Append(' '); AppendCSSGradientLength(aGradient->mStops[i].mLocation, tmpVal, aString); } needSep = true; } delete tmpVal; - aString.AppendLiteral(")"); + aString.Append(')'); } // -moz-image-rect(, , , , ) @@ -2299,10 +2299,10 @@ nsComputedDOMStyle::GetGridLineNames(const nsTArray& aLineNames) if (++i == i_end) { break; } - lineNamesString.AppendLiteral(" "); + lineNamesString.Append(' '); } } - lineNamesString.AppendLiteral(")"); + lineNamesString.Append(')'); val->SetString(lineNamesString); return val; } @@ -5167,7 +5167,7 @@ nsComputedDOMStyle::CreatePrimitiveValueForStyleFilter( nsCSSProps::ValueToKeyword(aStyleFilter.GetType(), nsCSSProps::kFilterFunctionKTable), filterFunctionString); - filterFunctionString.AppendLiteral("("); + filterFunctionString.Append('('); nsAutoString argumentString; if (aStyleFilter.GetType() == NS_STYLE_FILTER_DROP_SHADOW) { @@ -5185,7 +5185,7 @@ nsComputedDOMStyle::CreatePrimitiveValueForStyleFilter( filterFunctionString.Append(argumentString); // Filter function closing parenthesis. - filterFunctionString.AppendLiteral(")"); + filterFunctionString.Append(')'); value->SetString(filterFunctionString); return value; @@ -5340,7 +5340,7 @@ nsComputedDOMStyle::AppendTimingFunction(nsDOMCSSValueList *aValueList, tmp.AppendFloat(aTimingFunction.mFunc.mX2); tmp.AppendLiteral(", "); tmp.AppendFloat(aTimingFunction.mFunc.mY2); - tmp.AppendLiteral(")"); + tmp.Append(')'); } else { tmp.AppendLiteral("steps("); tmp.AppendInt(aTimingFunction.mSteps); diff --git a/layout/style/nsROCSSPrimitiveValue.cpp b/layout/style/nsROCSSPrimitiveValue.cpp index 8ee91c2550f..c000299c913 100644 --- a/layout/style/nsROCSSPrimitiveValue.cpp +++ b/layout/style/nsROCSSPrimitiveValue.cpp @@ -107,7 +107,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText) tmpStr.AssignLiteral("url("); nsStyleUtil::AppendEscapedCSSString(NS_ConvertUTF8toUTF16(specUTF8), tmpStr); - tmpStr.AppendLiteral(")"); + tmpStr.Append(')'); } else { // http://dev.w3.org/csswg/css3-values/#attr defines // 'about:invalid' as the default value for url attributes, @@ -254,7 +254,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText) case CSS_S : { nsStyleUtil::AppendCSSNumber(mValue.mFloat, tmpStr); - tmpStr.AppendLiteral("s"); + tmpStr.Append('s'); break; } case CSS_CM : diff --git a/layout/style/nsStyleUtil.cpp b/layout/style/nsStyleUtil.cpp index 299f386748d..249a64de838 100644 --- a/layout/style/nsStyleUtil.cpp +++ b/layout/style/nsStyleUtil.cpp @@ -219,7 +219,7 @@ nsStyleUtil::AppendPaintOrderValue(uint8_t aValue, for (uint32_t position = 0; position <= lastPositionToSerialize; position++) { if (position > 0) { - aResult.AppendLiteral(" "); + aResult.Append(' '); } uint8_t component = aValue & MASK; switch (component) { @@ -269,7 +269,7 @@ nsStyleUtil::AppendFontFeatureSettings(const nsTArray& aFeatures // 0 ==> off aResult.AppendLiteral(" off"); } else if (feat.mValue > 1) { - aResult.AppendLiteral(" "); + aResult.Append(' '); aResult.AppendInt(feat.mValue); } // else, omit value if 1, implied by default diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index 9391a88e76b..95e860d50af 100644 --- a/layout/xul/nsBox.cpp +++ b/layout/xul/nsBox.cpp @@ -60,7 +60,7 @@ nsBox::ListBox(nsAutoString& aResult) aResult.AppendASCII(addr); aResult.Append(name); - aResult.AppendLiteral(" "); + aResult.Append(' '); nsIContent* content = GetContent(); diff --git a/layout/xul/tree/nsTreeContentView.cpp b/layout/xul/tree/nsTreeContentView.cpp index 15f5660ae1e..2abb8fccd5c 100644 --- a/layout/xul/tree/nsTreeContentView.cpp +++ b/layout/xul/tree/nsTreeContentView.cpp @@ -555,7 +555,7 @@ nsTreeContentView::CycleHeader(nsITreeColumn* aCol) nsAutoString hints; column->GetAttr(kNameSpaceID_None, nsGkAtoms::sorthints, hints); - sortdirection.AppendLiteral(" "); + sortdirection.Append(' '); sortdirection += hints; nsCOMPtr rootnode = do_QueryInterface(mRoot); diff --git a/netwerk/base/src/Seer.cpp b/netwerk/base/src/Seer.cpp index a61cb49bd46..d5c200e4f50 100644 --- a/netwerk/base/src/Seer.cpp +++ b/netwerk/base/src/Seer.cpp @@ -920,7 +920,7 @@ ExtractOrigin(nsIURI *uri, nsAutoCString &s) s.AppendLiteral("://"); s.Append(host); if (port != -1) { - s.AppendLiteral(":"); + s.Append(':'); s.AppendInt(port); } } diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index 5492908dc8e..0f356f7a7c1 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -194,7 +194,7 @@ nsOfflineCacheEvictionFunction::OnFunctionCall(mozIStorageValueArray *values, ns const char *clientID = values->AsSharedUTF8String(0, &valueLen); const char *key = values->AsSharedUTF8String(1, &valueLen); nsAutoCString fullKey(clientID); - fullKey.AppendLiteral(":"); + fullKey.Append(':'); fullKey.Append(key); int generation = values->AsInt32(2); diff --git a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp index 14a9e8e9de4..ea37fa09dae 100644 --- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp +++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp @@ -678,7 +678,7 @@ mozTXTToHTMLConv::StructPhraseHit(const char16_t * aInString, int32_t aInStringL ) { openTags++; - aOutString.AppendLiteral("<"); + aOutString.Append('<'); aOutString.AppendASCII(tagHTML); aOutString.Append(char16_t(' ')); aOutString.AppendASCII(attributeHTML); diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp index 4cc21a8488a..9b1d8cb3f6a 100644 --- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp +++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp @@ -795,7 +795,7 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, pushBuffer.AppendLiteral("\n "); + pushBuffer.Append('>'); } else { int64_t size; aIndex->GetSize(&size); @@ -808,7 +808,7 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, FormatSizeString(size, sizeString); pushBuffer.Append(sizeString); } else { - pushBuffer.AppendLiteral(">"); + pushBuffer.Append('>'); } } pushBuffer.AppendLiteral("\n "); + theContext.Append('>'); } if (theCount == 0) { @@ -1392,7 +1392,7 @@ nsParser::ParseFragment(const nsAString& aSourceBuffer, endContext.Append(Substring(thisTag,0,endOfTag)); } - endContext.AppendLiteral(">"); + endContext.Append('>'); } result = Parse(endContext, diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp index 125da53bc56..ef3ea9aad4c 100644 --- a/security/manager/ssl/src/SSLServerCertVerification.cpp +++ b/security/manager/ssl/src/SSLServerCertVerification.cpp @@ -405,7 +405,7 @@ CertErrorRunnable::CheckCertOverrides() nsCString hostWithPortString; hostWithPortString.AppendASCII(mInfoObject->GetHostNameRaw()); - hostWithPortString.AppendLiteral(":"); + hostWithPortString.Append(':'); hostWithPortString.AppendInt(port); uint32_t remaining_display_errors = mCollectedErrors; diff --git a/security/manager/ssl/src/TransportSecurityInfo.cpp b/security/manager/ssl/src/TransportSecurityInfo.cpp index 2479b49ece4..34f1f05042e 100644 --- a/security/manager/ssl/src/TransportSecurityInfo.cpp +++ b/security/manager/ssl/src/TransportSecurityInfo.cpp @@ -578,7 +578,7 @@ formatPlainErrorMessage(const nsXPIDLCString &host, int32_t port, hostWithPort.AssignASCII(host); if (!suppressPort443 || port != 443) { - hostWithPort.AppendLiteral(":"); + hostWithPort.Append(':'); hostWithPort.AppendInt(port); } params[0] = hostWithPort.get(); diff --git a/security/manager/ssl/src/nsCertOverrideService.cpp b/security/manager/ssl/src/nsCertOverrideService.cpp index eafd503a501..a302a200332 100644 --- a/security/manager/ssl/src/nsCertOverrideService.cpp +++ b/security/manager/ssl/src/nsCertOverrideService.cpp @@ -862,7 +862,7 @@ nsCertOverrideService::GetHostWithPort(const nsACString & aHostName, int32_t aPo aPort = 443; } if (!hostPort.IsEmpty()) { - hostPort.AppendLiteral(":"); + hostPort.Append(':'); hostPort.AppendInt(aPort); } _retval.Assign(hostPort); diff --git a/security/manager/ssl/src/nsClientAuthRemember.cpp b/security/manager/ssl/src/nsClientAuthRemember.cpp index 1f46fa00ceb..2a17a4540fb 100644 --- a/security/manager/ssl/src/nsClientAuthRemember.cpp +++ b/security/manager/ssl/src/nsClientAuthRemember.cpp @@ -205,7 +205,7 @@ nsClientAuthRememberService::GetHostWithCert(const nsACString & aHostName, nsACString& _retval) { nsAutoCString hostCert(aHostName); - hostCert.AppendLiteral(":"); + hostCert.Append(':'); hostCert.Append(fingerprint); _retval.Assign(hostCert); diff --git a/security/manager/ssl/src/nsNSSCallbacks.cpp b/security/manager/ssl/src/nsNSSCallbacks.cpp index e236a97d32c..e6802976625 100644 --- a/security/manager/ssl/src/nsNSSCallbacks.cpp +++ b/security/manager/ssl/src/nsNSSCallbacks.cpp @@ -225,7 +225,7 @@ SECStatus nsNSSHttpRequestSession::createFcn(SEC_HTTP_SERVER_SESSION session, rs->mURL.Assign(http_protocol_variant); rs->mURL.AppendLiteral("://"); rs->mURL.Append(hss->mHost); - rs->mURL.AppendLiteral(":"); + rs->mURL.Append(':'); rs->mURL.AppendInt(hss->mPort); rs->mURL.Append(path_and_query_string); diff --git a/security/manager/ssl/src/nsNSSCertificate.cpp b/security/manager/ssl/src/nsNSSCertificate.cpp index 85a24f4a256..1dc6fcf570d 100644 --- a/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/security/manager/ssl/src/nsNSSCertificate.cpp @@ -1353,7 +1353,7 @@ nsNSSCertificate::GetUsagesString(bool localOnly, uint32_t* _verified, NS_ENSURE_SUCCESS(rv,rv); _usages.Truncate(); for (uint32_t i=0; i0) _usages.AppendLiteral(","); + if (i>0) _usages.Append(','); _usages.Append(tmpUsages[i]); nsMemory::Free(tmpUsages[i]); } diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp index fe42adc88a7..39e2a317ddf 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -2083,14 +2083,14 @@ ClientAuthDataRunnable::RunOnTargetThread() nsString cn_host_port; if (ccn && strcmp(ccn, hostname) == 0) { cn_host_port.Append(cn); - cn_host_port.AppendLiteral(":"); + cn_host_port.Append(':'); cn_host_port.AppendInt(port); } else { cn_host_port.Append(cn); cn_host_port.AppendLiteral(" ("); - cn_host_port.AppendLiteral(":"); + cn_host_port.Append(':'); cn_host_port.AppendInt(port); - cn_host_port.AppendLiteral(")"); + cn_host_port.Append(')'); } char* corg = CERT_GetOrgName(&mServerCert->subject); diff --git a/security/manager/ssl/src/nsPK11TokenDB.cpp b/security/manager/ssl/src/nsPK11TokenDB.cpp index 176e8233f33..0a048e47ed3 100644 --- a/security/manager/ssl/src/nsPK11TokenDB.cpp +++ b/security/manager/ssl/src/nsPK11TokenDB.cpp @@ -63,11 +63,11 @@ nsPK11Token::refreshTokenInfo() // Set the Hardware Version field mTokenHWVersion.AppendInt(tok_info.hardwareVersion.major); - mTokenHWVersion.AppendLiteral("."); + mTokenHWVersion.Append('.'); mTokenHWVersion.AppendInt(tok_info.hardwareVersion.minor); // Set the Firmware Version field mTokenFWVersion.AppendInt(tok_info.firmwareVersion.major); - mTokenFWVersion.AppendLiteral("."); + mTokenFWVersion.Append('.'); mTokenFWVersion.AppendInt(tok_info.firmwareVersion.minor); // Set the Serial Number field const char *ccSerial = (const char*)tok_info.serialNumber; diff --git a/security/manager/ssl/src/nsPKCS11Slot.cpp b/security/manager/ssl/src/nsPKCS11Slot.cpp index e4a807df990..94f753ae062 100644 --- a/security/manager/ssl/src/nsPKCS11Slot.cpp +++ b/security/manager/ssl/src/nsPKCS11Slot.cpp @@ -53,12 +53,12 @@ nsPKCS11Slot::refreshSlotInfo() // Set the Hardware Version field mSlotHWVersion = EmptyString(); mSlotHWVersion.AppendInt(slot_info.hardwareVersion.major); - mSlotHWVersion.AppendLiteral("."); + mSlotHWVersion.Append('.'); mSlotHWVersion.AppendInt(slot_info.hardwareVersion.minor); // Set the Firmware Version field mSlotFWVersion = EmptyString(); mSlotFWVersion.AppendInt(slot_info.firmwareVersion.major); - mSlotFWVersion.AppendLiteral("."); + mSlotFWVersion.Append('.'); mSlotFWVersion.AppendInt(slot_info.firmwareVersion.minor); } diff --git a/storage/src/VacuumManager.cpp b/storage/src/VacuumManager.cpp index 2cbeb243e3c..c5e04c5ae63 100644 --- a/storage/src/VacuumManager.cpp +++ b/storage/src/VacuumManager.cpp @@ -75,7 +75,7 @@ BaseCallback::HandleError(mozIStorageError *aError) nsAutoCString warnMsg; warnMsg.AppendLiteral("An error occured during async execution: "); warnMsg.AppendInt(result); - warnMsg.AppendLiteral(" "); + warnMsg.Append(' '); warnMsg.Append(message); NS_WARNING(warnMsg.get()); #endif @@ -241,7 +241,7 @@ Vacuumer::HandleError(mozIStorageError *aError) warnMsg.Append(mDBFilename); warnMsg.AppendLiteral(" - "); warnMsg.AppendInt(result); - warnMsg.AppendLiteral(" "); + warnMsg.Append(' '); warnMsg.Append(message); NS_WARNING(warnMsg.get()); #endif diff --git a/storage/src/mozStorageService.cpp b/storage/src/mozStorageService.cpp index abb27f00363..e9feed1f709 100644 --- a/storage/src/mozStorageService.cpp +++ b/storage/src/mozStorageService.cpp @@ -144,7 +144,7 @@ Service::CollectReports(nsIHandleReportCallback *aHandleReport, nsCString pathHead("explicit/storage/sqlite/"); pathHead.Append(conn->getFilename()); - pathHead.AppendLiteral("/"); + pathHead.Append('/'); SQLiteMutexAutoLock lockedScope(conn->sharedDBMutex); diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index 99fb84cf898..86a1dad9c2d 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -1640,7 +1640,7 @@ static PLDHashOperator ListToBeRemovedPlaceIds(PlaceHashKey* aEntry, if (visits.Length() == aEntry->visitCount && !aEntry->bookmarked) { nsCString* list = static_cast(aIdsList); if (!list->IsEmpty()) - list->AppendLiteral(","); + list->Append(','); list->AppendInt(visits[0].placeId); } return PL_DHASH_NEXT; @@ -1844,7 +1844,7 @@ private: nsCString query("DELETE FROM moz_places " "WHERE id IN ("); query.Append(placeIdsToRemove); - query.AppendLiteral(")"); + query.Append(')'); nsCOMPtr stmt = mHistory->GetStatement(query); NS_ENSURE_STATE(stmt); diff --git a/toolkit/components/places/nsNavBookmarks.cpp b/toolkit/components/places/nsNavBookmarks.cpp index f146efd0ceb..3248cebd175 100644 --- a/toolkit/components/places/nsNavBookmarks.cpp +++ b/toolkit/components/places/nsNavBookmarks.cpp @@ -1174,7 +1174,7 @@ nsNavBookmarks::RemoveFolderChildren(int64_t aFolderId) BookmarkData& child = folderChildrenArray[i]; if (child.type == TYPE_FOLDER) { - foldersToRemove.AppendLiteral(","); + foldersToRemove.Append(','); foldersToRemove.AppendInt(child.id); } diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index 9f090fd6615..19301b165b6 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -1038,7 +1038,7 @@ nsNavHistory::invalidateFrecencies(const nsCString& aPlaceIdsQueryString) if (!aPlaceIdsQueryString.IsEmpty()) { invalidFrecenciesSQLFragment.AppendLiteral("AND id IN("); invalidFrecenciesSQLFragment.Append(aPlaceIdsQueryString); - invalidFrecenciesSQLFragment.AppendLiteral(")"); + invalidFrecenciesSQLFragment.Append(')'); } nsRefPtr cb = aPlaceIdsQueryString.IsEmpty() ? new InvalidateAllFrecenciesCallback() @@ -2049,7 +2049,7 @@ PlacesSQLQueryBuilder::Limit() if (mUseLimit && mMaxResults > 0) { mQueryString += NS_LITERAL_CSTRING(" LIMIT "); mQueryString.AppendInt(mMaxResults); - mQueryString.AppendLiteral(" "); + mQueryString.Append(' '); } return NS_OK; } @@ -2404,7 +2404,7 @@ nsNavHistory::CleanupPlacesOnVisitsDelete(const nsCString& aPlaceIdsQueryString) NS_ENSURE_SUCCESS(rv, rv); if (wholeEntry) { if (!filteredPlaceIds.IsEmpty()) { - filteredPlaceIds.AppendLiteral(","); + filteredPlaceIds.Append(','); } filteredPlaceIds.AppendInt(placeId); URIs.AppendObject(uri); @@ -2469,7 +2469,7 @@ nsNavHistory::RemovePages(nsIURI **aURIs, uint32_t aLength) NS_ENSURE_SUCCESS(rv, rv); if (placeId != 0) { if (!deletePlaceIdsQueryString.IsEmpty()) - deletePlaceIdsQueryString.AppendLiteral(","); + deletePlaceIdsQueryString.Append(','); deletePlaceIdsQueryString.AppendInt(placeId); } } @@ -2589,7 +2589,7 @@ nsNavHistory::RemovePagesFromHost(const nsACString& aHost, bool aEntireDomain) bool hasMore = false; while (NS_SUCCEEDED(statement->ExecuteStep(&hasMore)) && hasMore) { if (!hostPlaceIds.IsEmpty()) - hostPlaceIds.AppendLiteral(","); + hostPlaceIds.Append(','); int64_t placeId; rv = statement->GetInt64(0, &placeId); NS_ENSURE_SUCCESS(rv, rv); @@ -2649,7 +2649,7 @@ nsNavHistory::RemovePagesByTimeframe(PRTime aBeginTime, PRTime aEndTime) NS_ENSURE_SUCCESS(rv, rv); if (placeId != 0) { if (!deletePlaceIdsQueryString.IsEmpty()) - deletePlaceIdsQueryString.AppendLiteral(","); + deletePlaceIdsQueryString.Append(','); deletePlaceIdsQueryString.AppendInt(placeId); } } @@ -2717,7 +2717,7 @@ nsNavHistory::RemoveVisitsByTimeframe(PRTime aBeginTime, PRTime aEndTime) // placeId should not be <= 0, but be defensive. if (placeId > 0) { if (!deletePlaceIdsQueryString.IsEmpty()) - deletePlaceIdsQueryString.AppendLiteral(","); + deletePlaceIdsQueryString.Append(','); deletePlaceIdsQueryString.AppendInt(placeId); } } diff --git a/tools/profiler/IntelPowerGadget.cpp b/tools/profiler/IntelPowerGadget.cpp index cd96c348cab..fe267b80f35 100644 --- a/tools/profiler/IntelPowerGadget.cpp +++ b/tools/profiler/IntelPowerGadget.cpp @@ -58,7 +58,7 @@ IntelPowerGadget::Init() nsCString ipg_library; if (path && *path) { ipg_library.Append(path); - ipg_library.AppendLiteral("/"); + ipg_library.Append('/'); ipg_library.AppendLiteral(PG_LIBRARY_NAME); libpowergadget = PR_LoadLibrary(ipg_library.get()); } diff --git a/uriloader/exthandler/win/nsOSHelperAppService.cpp b/uriloader/exthandler/win/nsOSHelperAppService.cpp index 4c174d71d55..43c2c2a314f 100644 --- a/uriloader/exthandler/win/nsOSHelperAppService.cpp +++ b/uriloader/exthandler/win/nsOSHelperAppService.cpp @@ -282,7 +282,7 @@ static void CleanupHandlerPath(nsString& aPath) if (lastCommaPos != kNotFound) aPath.Truncate(lastCommaPos); - aPath.AppendLiteral(" "); + aPath.Append(' '); // case insensitive uint32_t index = aPath.Find(".exe ", true); diff --git a/widget/windows/nsTextStore.cpp b/widget/windows/nsTextStore.cpp index 7f9c1b3fc6c..0b83f0ef76f 100644 --- a/widget/windows/nsTextStore.cpp +++ b/widget/windows/nsTextStore.cpp @@ -202,7 +202,7 @@ GetFindFlagName(DWORD aFindFlag) if (description.IsEmpty()) { description.AppendLiteral("Unknown ("); description.AppendInt(static_cast(aFindFlag)); - description.AppendLiteral(")"); + description.Append(')'); } return description; } diff --git a/widget/xpwidgets/GfxInfoX11.cpp b/widget/xpwidgets/GfxInfoX11.cpp index b7f7576362e..bd8877c099f 100644 --- a/widget/xpwidgets/GfxInfoX11.cpp +++ b/widget/xpwidgets/GfxInfoX11.cpp @@ -174,7 +174,7 @@ GfxInfo::GetData() if (bytesread) { mAdapterDescription.AppendLiteral(": "); mAdapterDescription.Append(nsDependentCString(buf)); - mAdapterDescription.AppendLiteral("\n"); + mAdapterDescription.Append('\n'); } #ifdef MOZ_CRASHREPORTER CrashReporter::AppendAppNotesToCrashReport(mAdapterDescription); diff --git a/widget/xpwidgets/nsPrintOptionsImpl.cpp b/widget/xpwidgets/nsPrintOptionsImpl.cpp index 8774b51548f..d93175eea36 100644 --- a/widget/xpwidgets/nsPrintOptionsImpl.cpp +++ b/widget/xpwidgets/nsPrintOptionsImpl.cpp @@ -158,7 +158,7 @@ nsPrintOptions::GetPrefName(const char * aPrefName, if (aPrinterName.Length()) { mPrefName.AppendLiteral("printer_"); AppendUTF16toUTF8(aPrinterName, mPrefName); - mPrefName.AppendLiteral("."); + mPrefName.Append('.'); } mPrefName += aPrefName; diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp index 3e5e4f409d2..3db64aec72a 100644 --- a/xpcom/base/nsConsoleService.cpp +++ b/xpcom/base/nsConsoleService.cpp @@ -210,7 +210,7 @@ nsConsoleService::LogMessageWithMode(nsIConsoleMessage* aMessage, if (IsDebuggerPresent()) { nsString msg; aMessage->GetMessageMoz(getter_Copies(msg)); - msg.AppendLiteral("\n"); + msg.Append('\n'); OutputDebugStringW(msg.get()); } #endif diff --git a/xpcom/base/nsStatusReporterManager.cpp b/xpcom/base/nsStatusReporterManager.cpp index a79878f4fa7..bc13874c667 100644 --- a/xpcom/base/nsStatusReporterManager.cpp +++ b/xpcom/base/nsStatusReporterManager.cpp @@ -151,7 +151,7 @@ nsStatusReporterManager::DumpReports() nsCString filename("status-reports-"); filename.AppendInt(getpid()); - filename.AppendLiteral("-"); + filename.Append('-'); filename.AppendInt(number++); filename.AppendLiteral(".json"); diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp index 5cde8314475..fd8019ca0be 100644 --- a/xpcom/base/nsTraceRefcnt.cpp +++ b/xpcom/base/nsTraceRefcnt.cpp @@ -683,7 +683,7 @@ InitLog(const char* aEnvVar, const char* aMsg, FILE** aResult) if (hasLogExtension) { fname.Cut(fname.Length() - 4, 4); } - fname.AppendLiteral("_"); + fname.Append('_'); fname.Append((char*)XRE_ChildProcessTypeToString(XRE_GetProcessType())); fname.AppendLiteral("_pid"); fname.AppendInt((uint32_t)getpid());