Bug 870698 - Part 10: Replace Append(NS_LITERAL_STRING("")) with AppendLiteral(u""). r=erahm

The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: H9I6vNDMdIr
This commit is contained in:
Chris Peterson
2017-09-07 18:32:54 -07:00
parent 8b885bcc5c
commit 0a61b3fb68
10 changed files with 35 additions and 35 deletions

View File

@@ -18,10 +18,10 @@ nsHtml5ViewSourceUtils::NewBodyAttributes()
nsString klass;
if (mozilla::Preferences::GetBool("view_source.wrap_long_lines", true)) {
klass.Append(NS_LITERAL_STRING("wrap "));
klass.AppendLiteral(u"wrap ");
}
if (mozilla::Preferences::GetBool("view_source.syntax_highlight", true)) {
klass.Append(NS_LITERAL_STRING("highlight"));
klass.AppendLiteral(u"highlight");
}
if (!klass.IsEmpty()) {
bodyAttrs->addAttribute(