mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1402666 - Part 3: Replace Replace(NS_LITERAL_STRING("")) with ReplaceLiteral(u""). r=erahm
MozReview-Commit-ID: Ji6UdG32RF4 --HG-- extra : rebase_source : 1565a1e99f40785dad0d0d7652e42222dcdf8881 extra : source : c57e906ba75fda4745134ef8307589e28f4c8d70
This commit is contained in:
parent
e10b7338b7
commit
c4dff4f83d
@ -129,7 +129,7 @@ ConvertTexttoAsterisks(AccessibleWrap* accWrap, nsAString& aString)
|
||||
// convert each char to "*" when it's "password text"
|
||||
if (accWrap->NativeRole() == roles::PASSWORD_TEXT) {
|
||||
for (uint32_t i = 0; i < aString.Length(); i++)
|
||||
aString.Replace(i, 1, NS_LITERAL_STRING("*"));
|
||||
aString.ReplaceLiteral(i, 1, u"*");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11954,7 +11954,7 @@ nsGlobalWindow::ShowSlowScriptDialog(const nsString& aAddonId)
|
||||
}
|
||||
|
||||
// Insert U+2026 HORIZONTAL ELLIPSIS
|
||||
filenameUTF16.Replace(cutStart, cutLength, NS_LITERAL_STRING(u"\x2026"));
|
||||
filenameUTF16.ReplaceLiteral(cutStart, cutLength, u"\x2026");
|
||||
}
|
||||
const char16_t *formatParams[] = { filenameUTF16.get() };
|
||||
rv = nsContentUtils::FormatLocalizedString(nsContentUtils::eDOM_PROPERTIES,
|
||||
|
@ -5422,7 +5422,7 @@ HTMLInputElement::NormalizeDateTimeLocal(nsAString& aValue) const
|
||||
// Use 'T' as the separator between date string and time string.
|
||||
int32_t sepIndex = aValue.FindChar(' ');
|
||||
if (sepIndex != -1) {
|
||||
aValue.Replace(sepIndex, 1, NS_LITERAL_STRING("T"));
|
||||
aValue.ReplaceLiteral(sepIndex, 1, u"T");
|
||||
} else {
|
||||
sepIndex = aValue.FindChar('T');
|
||||
}
|
||||
|
@ -209,9 +209,9 @@ OSPreferences::ReadDateTimePattern(DateTimeFormatStyle aDateStyle,
|
||||
start = str->BeginReading(pos);
|
||||
str->EndReading(end);
|
||||
if (FindInReadable(NS_LITERAL_STRING("dddd"), pos, end)) {
|
||||
str->Replace(pos - start, 4, NS_LITERAL_STRING("EEEE"));
|
||||
str->ReplaceLiteral(pos - start, 4, u"EEEE");
|
||||
} else if (FindInReadable(NS_LITERAL_STRING("ddd"), pos, end)) {
|
||||
str->Replace(pos - start, 3, NS_LITERAL_STRING("EEE"));
|
||||
str->ReplaceLiteral(pos - start, 3, u"EEE");
|
||||
}
|
||||
|
||||
// Also, Windows uses lowercase "g" or "gg" for era, but ICU wants uppercase "G"
|
||||
|
@ -653,7 +653,7 @@ void nsIDNService::normalizeFullStops(nsAString& s)
|
||||
case 0x3002:
|
||||
case 0xFF0E:
|
||||
case 0xFF61:
|
||||
s.Replace(index, 1, NS_LITERAL_STRING("."));
|
||||
s.ReplaceLiteral(index, 1, u".");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3047,7 +3047,7 @@ bool
|
||||
GetIDFromMinidump(nsIFile* minidump, nsAString& id)
|
||||
{
|
||||
if (minidump && NS_SUCCEEDED(minidump->GetLeafName(id))) {
|
||||
id.Replace(id.Length() - 4, 4, NS_LITERAL_STRING(""));
|
||||
id.ReplaceLiteral(id.Length() - 4, 4, u"");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user