add 'utf8Len' parameter for 'CanBeCompressed()'

Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
This commit is contained in:
zhaozhibo
2022-01-18 14:57:19 +08:00
parent 676f7df823
commit e01f55e69e
3 changed files with 7 additions and 7 deletions
-3
View File
@@ -246,9 +246,6 @@ bool EcmaString::CanBeCompressed(const uint8_t *utf8Data, uint32_t utf8Len)
}
bool isCompressed = true;
uint32_t index = 0;
if (utf8Len == UINT32_MAX) {
utf8Len = strlen((const char *)utf8Data);
}
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
while (index < utf8Len) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)