зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1750945 - Remove legacy OldEscapeChars table. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D189701
This commit is contained in:
Родитель
270451b930
Коммит
7d7b5f1a70
|
@ -293,35 +293,6 @@ static bool dontNeedEscape(uint16_t aChar, uint32_t aFlags) {
|
|||
: false;
|
||||
}
|
||||
|
||||
// Temporary static assert to make sure that the rewrite to using
|
||||
// `BuildEscapeChars` didn't change the final array in memory.
|
||||
// It will be removed in Bug 1750945.
|
||||
|
||||
static_assert([]() constexpr {
|
||||
constexpr uint32_t OldEscapeChars[256] =
|
||||
// clang-format off
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
||||
0,132095, 0,131584,132095, 0,132095,131696,132095,132095,132095,132095,132095,132095,132025,131856, // 2x !"#$%&'()*+,-./
|
||||
132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132080,132080, 0,132080, 0,131840, // 3x 0123456789:;<=>?
|
||||
132080,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095, // 4x @ABCDEFGHIJKLMNO
|
||||
132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132080, 896,132080, 896,132095, // 5x PQRSTUVWXYZ[\]^_
|
||||
384,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095, // 6x `abcdefghijklmno
|
||||
132095,132095,132095,132095,132095,132095,132095,132095,132095,132095,132095, 896, 1012, 896,132095, 0, // 7x pqrstuvwxyz{|}~ DEL
|
||||
0 // 80 to FF are zero
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
for (size_t i = 0; i < EscapeChars.size(); ++i) {
|
||||
if (OldEscapeChars[i] != EscapeChars[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}());
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче