Remove const from hb_array_t details
Will come in through <T> if desired.
This commit is contained in:
parent
f3336580dd
commit
d7865107ea
|
@ -55,7 +55,7 @@ struct TrackTableEntry
|
|||
unsigned int index,
|
||||
unsigned int nSizes) const
|
||||
{
|
||||
return hb_array_t<FWORD> ((base+valuesZ).arrayZ, nSizes)[index];
|
||||
return hb_array_t<const FWORD> ((base+valuesZ).arrayZ, nSizes)[index];
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -88,7 +88,7 @@ struct TrackData
|
|||
const void *base) const
|
||||
{
|
||||
unsigned int sizes = nSizes;
|
||||
hb_array_t<Fixed> size_table ((base+sizeTable).arrayZ, sizes);
|
||||
hb_array_t<const Fixed> size_table ((base+sizeTable).arrayZ, sizes);
|
||||
|
||||
float s0 = size_table[idx].to_float ();
|
||||
float s1 = size_table[idx + 1].to_float ();
|
||||
|
@ -134,7 +134,7 @@ struct TrackData
|
|||
if (sizes == 1) return trackTableEntry->get_value (base, 0, sizes);
|
||||
|
||||
/* TODO bfind() */
|
||||
hb_array_t<Fixed> size_table ((base+sizeTable).arrayZ, sizes);
|
||||
hb_array_t<const Fixed> size_table ((base+sizeTable).arrayZ, sizes);
|
||||
unsigned int size_index;
|
||||
for (size_index = 0; size_index < sizes - 1; size_index++)
|
||||
if (size_table[size_index].to_float () >= csspx)
|
||||
|
|
|
@ -513,9 +513,9 @@ template <typename T>
|
|||
struct hb_array_t
|
||||
{
|
||||
inline hb_array_t (void) : arrayZ (nullptr), len (0) {}
|
||||
inline hb_array_t (const T *array_, unsigned int len_) : arrayZ (array_), len (len_) {}
|
||||
inline hb_array_t (T *array_, unsigned int len_) : arrayZ (array_), len (len_) {}
|
||||
|
||||
inline const T& operator [] (unsigned int i) const
|
||||
inline T& operator [] (unsigned int i) const
|
||||
{
|
||||
if (unlikely (i >= len)) return Null(T);
|
||||
return arrayZ[i];
|
||||
|
@ -534,7 +534,7 @@ struct hb_array_t
|
|||
|
||||
inline void free (void) { ::free ((void *) arrayZ); arrayZ = nullptr; len = 0; }
|
||||
|
||||
const T *arrayZ;
|
||||
T *arrayZ;
|
||||
unsigned int len;
|
||||
};
|
||||
|
||||
|
|
|
@ -330,8 +330,8 @@ struct ResourceTypeRecord
|
|||
inline const ResourceRecord& get_resource_record (unsigned int i,
|
||||
const void *type_base) const
|
||||
{
|
||||
return hb_array_t<ResourceRecord> ((type_base+resourcesZ).arrayZ,
|
||||
get_resource_count ()) [i];
|
||||
return hb_array_t<const ResourceRecord> ((type_base+resourcesZ).arrayZ,
|
||||
get_resource_count ()) [i];
|
||||
}
|
||||
|
||||
inline bool sanitize (hb_sanitize_context_t *c,
|
||||
|
|
Loading…
Reference in New Issue