summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2018-10-20 08:09:52 +0700
committerBehdad Esfahbod <behdad@behdad.org>2018-10-19 19:15:42 -0700
commit5a24ea15e0c242c3e2a4a49980da3ab7dd61a3df (patch)
tree0411357902f992218502457e06dc5b0cfdf97e03
parent08b7172969b442cc83b47f44e685a0495b2d8cd4 (diff)
Make more 'coords' params const.
-rw-r--r--src/hb-ot-layout-common.hh8
-rw-r--r--src/hb-ot-layout-gsubgpos.hh2
-rw-r--r--src/hb-ot-var-hvar-table.hh2
-rw-r--r--src/hb-ot-var-mvar-table.hh2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh
index c59910de..98f6a079 100644
--- a/src/hb-ot-layout-common.hh
+++ b/src/hb-ot-layout-common.hh
@@ -1475,7 +1475,7 @@ struct VarRegionAxis
struct VarRegionList
{
inline float evaluate (unsigned int region_index,
- int *coords, unsigned int coord_len) const
+ const int *coords, unsigned int coord_len) const
{
if (unlikely (region_index >= regionCount))
return 0.;
@@ -1520,7 +1520,7 @@ struct VarData
{ return itemCount * get_row_size (); }
inline float get_delta (unsigned int inner,
- int *coords, unsigned int coord_count,
+ const int *coords, unsigned int coord_count,
const VarRegionList &regions) const
{
if (unlikely (inner >= itemCount))
@@ -1573,7 +1573,7 @@ struct VarData
struct VariationStore
{
inline float get_delta (unsigned int outer, unsigned int inner,
- int *coords, unsigned int coord_count) const
+ const int *coords, unsigned int coord_count) const
{
if (unlikely (outer >= dataSets.len))
return 0.;
@@ -1584,7 +1584,7 @@ struct VariationStore
}
inline float get_delta (unsigned int index,
- int *coords, unsigned int coord_count) const
+ const int *coords, unsigned int coord_count) const
{
unsigned int outer = index >> 16;
unsigned int inner = index & 0xFFFF;
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 14fab6b9..a4066265 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -901,7 +901,7 @@ static inline bool match_input (hb_ot_apply_context_t *c,
}
static inline bool ligate_input (hb_ot_apply_context_t *c,
unsigned int count, /* Including the first glyph */
- unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
+ const unsigned int match_positions[HB_MAX_CONTEXT_LENGTH], /* Including the first glyph */
unsigned int match_length,
hb_codepoint_t lig_glyph,
unsigned int total_component_count)
diff --git a/src/hb-ot-var-hvar-table.hh b/src/hb-ot-var-hvar-table.hh
index d87285b7..66e086e1 100644
--- a/src/hb-ot-var-hvar-table.hh
+++ b/src/hb-ot-var-hvar-table.hh
@@ -115,7 +115,7 @@ struct HVARVVAR
}
inline float get_advance_var (hb_codepoint_t glyph,
- int *coords, unsigned int coord_count) const
+ const int *coords, unsigned int coord_count) const
{
unsigned int varidx = (this+advMap).map (glyph);
return (this+varStore).get_delta (varidx, coords, coord_count);
diff --git a/src/hb-ot-var-mvar-table.hh b/src/hb-ot-var-mvar-table.hh
index d60c6b91..5d6b5595 100644
--- a/src/hb-ot-var-mvar-table.hh
+++ b/src/hb-ot-var-mvar-table.hh
@@ -72,7 +72,7 @@ struct MVAR
}
inline float get_var (hb_tag_t tag,
- int *coords, unsigned int coord_count) const
+ const int *coords, unsigned int coord_count) const
{
const VariationValueRecord *record;
record = (VariationValueRecord *) bsearch (&tag, valuesZ.arrayZ,