summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-02-26 00:18:17 -0800
committerBehdad Esfahbod <behdad@behdad.org>2018-02-26 00:18:17 -0800
commitf0bc6c0992c4302ae1a20f155ad256bfa331087c (patch)
tree6b6f0211f1a7de71c264349ad53d1ee03c3c3b90
parentbb82f01383db7cf05040fbd5881e17e263ef6369 (diff)
[aat/trak] Clean up
We always just used "unsigned int" for counter values. There's no use for uint16_t outside of a struct. Also, no need for explict casting where implicit does.
-rw-r--r--src/hb-aat-layout-trak-table.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh
index 7af62022..6c83760e 100644
--- a/src/hb-aat-layout-trak-table.hh
+++ b/src/hb-aat-layout-trak-table.hh
@@ -39,7 +39,7 @@ namespace AAT {
struct TrackTableEntry
{
- inline bool sanitize (hb_sanitize_context_t *c, const void *base, uint16_t size) const
+ inline bool sanitize (hb_sanitize_context_t *c, const void *base, unsigned int size) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && ((base+values).sanitize (c, size)));
@@ -74,8 +74,8 @@ struct TrackData
if (!(c->check_struct (this)))
return_trace (false);
- uint16_t tracks = (uint16_t) nTracks;
- uint16_t sizes = (uint16_t) nSizes;
+ unsigned int tracks = nTracks;
+ unsigned int sizes = nSizes;
// It should have at least one track
if (tracks < 1) return_trace (false);
@@ -86,7 +86,7 @@ struct TrackData
if (!((base+sizeTable).sanitize (c, sizes)))
return_trace (false);
- for (uint16_t i = 0; i < tracks; ++i)
+ for (unsigned int i = 0; i < tracks; ++i)
if (!(trackTable[i].sanitize (c, base, sizes)))
return_trace (false);
@@ -106,8 +106,8 @@ struct TrackData
/* TODO Clean this up. */
- uint16_t tracks = (uint16_t) nTracks;
- uint16_t sizes = (uint16_t) nSizes;
+ unsigned int tracks = nTracks;
+ unsigned int sizes = nSizes;
const TrackTableEntry *trackTableEntry = nullptr;
for (unsigned int i = 0; i < sizes; ++i)