Skip to content

Commit

Permalink
Bug 617897 - Replace calls to AppendASCII('*') with Append('*'). r=dougt
Browse files Browse the repository at this point in the history
  • Loading branch information
orva committed May 7, 2013
1 parent 48e2eb4 commit abab531
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion content/base/src/nsContentUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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=");
Expand Down
2 changes: 1 addition & 1 deletion image/encoders/ico/nsICOEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion layout/inspector/src/nsFontFace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void
AppendToFormat(nsAString & aResult, const char* aFormat)
{
if (!aResult.IsEmpty()) {
aResult.AppendASCII(",");
aResult.Append(',');
}
aResult.AppendASCII(aFormat);
}
Expand Down
4 changes: 2 additions & 2 deletions storage/src/mozStorageService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ Service::getSingleton()
nsCOMPtr<nsIPromptService> 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());
Expand Down
16 changes: 8 additions & 8 deletions toolkit/profile/nsToolkitProfileService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion toolkit/xre/nsUpdateDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions widget/windows/nsImageClipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions xpcom/io/nsLocalFileWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'\\');

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1787,7 +1787,7 @@ nsLocalFile::CopySingleFile(nsIFile *sourceFile, nsIFile *destParent,
nsAutoString destPath;
destParent->GetTarget(destPath);

destPath.AppendASCII("\\");
destPath.Append('\\');

if (newName.IsEmpty())
{
Expand Down

0 comments on commit abab531

Please sign in to comment.