From abab53190f7af809eafdf1ffe7687c03cb8e6654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iivari=20=C3=84ik=C3=A4s?= Date: Tue, 7 May 2013 10:25:21 -0400 Subject: [PATCH] Bug 617897 - Replace calls to AppendASCII('*') with Append('*'). r=dougt --- content/base/src/nsContentUtils.cpp | 2 +- docshell/base/nsDocShell.cpp | 2 +- image/encoders/ico/nsICOEncoder.cpp | 2 +- layout/inspector/src/nsFontFace.cpp | 2 +- storage/src/mozStorageService.cpp | 4 ++-- toolkit/profile/nsToolkitProfileService.cpp | 16 ++++++++-------- toolkit/xre/nsUpdateDriver.cpp | 2 +- widget/windows/nsImageClipboard.cpp | 4 ++-- xpcom/io/nsLocalFileWin.cpp | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index f8cbc2850b1d3..1ffba9d03ef47 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -3362,7 +3362,7 @@ nsContentUtils::GetWrapperSafeScriptFilename(nsIDocument *aDocument, // automation that the chrome document expects. nsAutoCString spec; docURI->GetSpec(spec); - spec.AppendASCII(" -> "); + spec.AppendLiteral(" -> "); spec.Append(aScriptURI); aScriptURI = spec; diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index ee896c2cf1d06..5b22686f8e10d 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -4494,7 +4494,7 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL, errorPageUrl.AppendLiteral("&u="); errorPageUrl.AppendASCII(escapedUrl.get()); if (!escapedCSSClass.IsEmpty()) { - errorPageUrl.AppendASCII("&s="); + errorPageUrl.AppendLiteral("&s="); errorPageUrl.AppendASCII(escapedCSSClass.get()); } errorPageUrl.AppendLiteral("&c="); diff --git a/image/encoders/ico/nsICOEncoder.cpp b/image/encoders/ico/nsICOEncoder.cpp index 1021cd45b61dd..107c4a2521774 100644 --- a/image/encoders/ico/nsICOEncoder.cpp +++ b/image/encoders/ico/nsICOEncoder.cpp @@ -137,7 +137,7 @@ nsICOEncoder::AddImageFrame(const uint8_t* aData, nsresult rv; nsAutoString params; - params.AppendASCII("bpp="); + params.AppendLiteral("bpp="); params.AppendInt(mICODirEntry.mBitCount); rv = mContainedEncoder->InitFromData(aData, aLength, aWidth, aHeight, diff --git a/layout/inspector/src/nsFontFace.cpp b/layout/inspector/src/nsFontFace.cpp index edb23ae15f6cd..78000b9fd2308 100644 --- a/layout/inspector/src/nsFontFace.cpp +++ b/layout/inspector/src/nsFontFace.cpp @@ -144,7 +144,7 @@ static void AppendToFormat(nsAString & aResult, const char* aFormat) { if (!aResult.IsEmpty()) { - aResult.AppendASCII(","); + aResult.Append(','); } aResult.AppendASCII(aFormat); } diff --git a/storage/src/mozStorageService.cpp b/storage/src/mozStorageService.cpp index 75bd54696f89d..b636bf4c6abe6 100644 --- a/storage/src/mozStorageService.cpp +++ b/storage/src/mozStorageService.cpp @@ -246,8 +246,8 @@ Service::getSingleton() nsCOMPtr ps(do_GetService(NS_PROMPTSERVICE_CONTRACTID)); if (ps) { nsAutoString title, message; - title.AppendASCII("SQLite Version Error"); - message.AppendASCII("The application has been updated, but your version " + title.AppendLiteral("SQLite Version Error"); + message.AppendLiteral("The application has been updated, but your version " "of SQLite is too old and the application cannot " "run."); (void)ps->Alert(nullptr, title.get(), message.get()); diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index 868b34da881cd..69e43d0075c96 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -674,16 +674,16 @@ nsToolkitProfileService::CreateDefaultProfileForApp(const nsACString& aProfileNa nsCString ini; ini.SetCapacity(512); - ini.AppendASCII("[General]\n"); - ini.AppendASCII("StartWithLastProfile=1\n\n"); + ini.AppendLiteral("[General]\n"); + ini.AppendLiteral("StartWithLastProfile=1\n\n"); - ini.AppendASCII("[Profile0]\n"); - ini.AppendASCII("Name=default\n"); - ini.AppendASCII("IsRelative=1\n"); - ini.AppendASCII("Path="); + ini.AppendLiteral("[Profile0]\n"); + ini.AppendLiteral("Name=default\n"); + ini.AppendLiteral("IsRelative=1\n"); + ini.AppendLiteral("Path="); ini.Append(profileDir); - ini.AppendASCII("\n"); - ini.AppendASCII("Default=1\n\n"); + ini.Append('\n'); + ini.AppendLiteral("Default=1\n\n"); FILE* writeFile; rv = profilesini->OpenANSIFileDesc("w", &writeFile); diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp index 2dd61a93fc04e..50d21099885d8 100644 --- a/toolkit/xre/nsUpdateDriver.cpp +++ b/toolkit/xre/nsUpdateDriver.cpp @@ -531,7 +531,7 @@ SwitchToUpdatedApp(nsIFile *greDir, nsIFile *updateDir, nsIFile *statusFile, // Append a special token to the PID in order to let the updater know that it // just needs to replace the update directory. - pid.AppendASCII("/replace"); + pid.AppendLiteral("/replace"); int argc = appArgc + 5; char **argv = new char*[argc + 1]; diff --git a/widget/windows/nsImageClipboard.cpp b/widget/windows/nsImageClipboard.cpp index b5e77ce6c43e5..bbde516c14c69 100644 --- a/widget/windows/nsImageClipboard.cpp +++ b/widget/windows/nsImageClipboard.cpp @@ -131,9 +131,9 @@ nsImageToClipboard::CreateFromImage ( imgIContainer* inImage, HANDLE* outBitmap uint32_t format; nsAutoString options; if (mWantDIBV5) { - options.AppendASCII("version=5;bpp="); + options.AppendLiteral("version=5;bpp="); } else { - options.AppendASCII("version=3;bpp="); + options.AppendLiteral("version=3;bpp="); } switch (frame->Format()) { case gfxASurface::ImageFormatARGB32: diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 89143c4b340dc..c41b6734478c5 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -736,9 +736,9 @@ OpenDir(const nsAFlatString &name, nsDir * *dir) //If 'name' ends in a slash or backslash, do not append //another backslash. if (filename.Last() == L'/' || filename.Last() == L'\\') - filename.AppendASCII("*"); + filename.Append('*'); else - filename.AppendASCII("\\*"); + filename.AppendLiteral("\\*"); filename.ReplaceChar(L'/', L'\\'); @@ -1041,7 +1041,7 @@ nsLocalFile::ResolveAndStat() // slutty hack designed to work around bug 134796 until it is fixed nsAutoString nsprPath(mWorkingPath.get()); if (mWorkingPath.Length() == 2 && mWorkingPath.CharAt(1) == L':') - nsprPath.AppendASCII("\\"); + nsprPath.Append('\\'); // first we will see if the working path exists. If it doesn't then // there is nothing more that can be done @@ -1787,7 +1787,7 @@ nsLocalFile::CopySingleFile(nsIFile *sourceFile, nsIFile *destParent, nsAutoString destPath; destParent->GetTarget(destPath); - destPath.AppendASCII("\\"); + destPath.Append('\\'); if (newName.IsEmpty()) {