Bug 1750945 - Remove legacy OldEscapeChars table. r=necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D189701
This commit is contained in:
Jonathan Kew 2023-10-02 19:19:03 +00:00
Родитель 270451b930
Коммит 7d7b5f1a70
1 изменённых файлов: 0 добавлений и 29 удалений

Просмотреть файл

@ -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;
}());
//----------------------------------------------------------------------------------------
/**