//pdf: base::numerics::* -> base::*
The new names are shorter and not deprecated. Bug: 409350835 Change-Id: I4e1f14f4ac4efe170e6b8a22f1925530f3d7077a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6441738 Commit-Queue: Tom Sepez <tsepez@chromium.org> Auto-Submit: Elly FJ <ellyjones@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/main@{#1444953}
This commit is contained in:
@ -70,7 +70,7 @@ bool GetFontTable(int fd,
|
||||
return false;
|
||||
}
|
||||
// Font data is stored in net (big-endian) order.
|
||||
uint16_t num_tables = base::numerics::U16FromBigEndian(bytes);
|
||||
uint16_t num_tables = base::U16FromBigEndian(bytes);
|
||||
|
||||
// Read the table directory.
|
||||
static const size_t kTableEntrySize = 16u;
|
||||
@ -86,12 +86,11 @@ bool GetFontTable(int fd,
|
||||
for (uint16_t i = 0u; i < num_tables; ++i) {
|
||||
auto entry = table_entries.subspan(i * kTableEntrySize, kTableEntrySize);
|
||||
// The `table_tag` is encoded in the same endian as the tag in the table.
|
||||
auto tag = base::numerics::U32FromNativeEndian(entry.first<4u>());
|
||||
auto tag = base::U32FromNativeEndian(entry.first<4u>());
|
||||
if (tag == table_tag) {
|
||||
// Font data is stored in net (big-endian) order.
|
||||
data_offset = base::numerics::U32FromBigEndian(entry.subspan<8u, 4u>());
|
||||
data_length =
|
||||
base::numerics::U32FromBigEndian(entry.subspan<12u, 4u>());
|
||||
data_offset = base::U32FromBigEndian(entry.subspan<8u, 4u>());
|
||||
data_length = base::U32FromBigEndian(entry.subspan<12u, 4u>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user