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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user