From b1821b9d092e4fd7fd888f4bffc341283bace461 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Fri, 30 Nov 2018 16:31:01 -0800 Subject: [PATCH] some more --- src/hb-subset-cff-common.hh | 4 ++-- src/hb-subset-cff1.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index d297076e8..d4cc1f258 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -120,7 +120,7 @@ struct StrEncoder set_error (); return; } - memcpy (&buff[offset], &str.str[0], str.len); + memcpy (&buff[offset], &str.str[static_cast(0)], str.len); } inline bool is_error (void) const { return error; } @@ -226,7 +226,7 @@ struct CFFFontDict_OpSerializer : OpSerializer { HBUINT8 *d = c->allocate_size (opstr.str.len); if (unlikely (d == nullptr)) return_trace (false); - memcpy (d, &opstr.str.str[0], opstr.str.len); + memcpy (d, &opstr.str.str[static_cast(0)], opstr.str.len); } return_trace (true); } diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index 2ffbdc91c..89df106a7 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -599,7 +599,7 @@ struct cff_subset_plan { hb_subset_plan_t *plan) { /* make sure notdef is first */ - if ((plan->glyphs.len == 0) || (plan->glyphs[0] != 0)) return false; + if ((plan->glyphs.len == 0) || (plan->glyphs[static_cast(0)] != 0)) return false; final_size = 0; num_glyphs = plan->glyphs.len; @@ -813,7 +813,7 @@ struct cff_subset_plan { } if (!acc.is_CID ()) - offsets.privateDictInfo = fontdicts_mod[0].privateDictInfo; + offsets.privateDictInfo = fontdicts_mod[static_cast(0)].privateDictInfo; return ((subset_charstrings.len == plan->glyphs.len) && (fontdicts_mod.len == subset_fdcount));