[vector] Make pointer cast explicit
Too bad this doesn't help MSVC 2008 build, as explicit operators are C++11.
This commit is contained in:
parent
72955e6825
commit
861bc75349
|
@ -658,7 +658,7 @@ struct Supplier
|
||||||
}
|
}
|
||||||
inline Supplier (const hb_vector_t<Type> *v)
|
inline Supplier (const hb_vector_t<Type> *v)
|
||||||
{
|
{
|
||||||
head = *v;
|
head = (const Type *) *v;
|
||||||
len = v->len;
|
len = v->len;
|
||||||
stride = sizeof (Type);
|
stride = sizeof (Type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,7 +495,8 @@ struct CmapSubtableLongSegmented
|
||||||
{
|
{
|
||||||
TRACE_SERIALIZE (this);
|
TRACE_SERIALIZE (this);
|
||||||
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
if (unlikely (!c->extend_min (*this))) return_trace (false);
|
||||||
Supplier<CmapSubtableLongGroup> supplier (group_data, group_data.len);
|
Supplier<CmapSubtableLongGroup> supplier ((const OT::CmapSubtableLongGroup*) group_data,
|
||||||
|
group_data.len);
|
||||||
if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false);
|
if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,8 +375,8 @@ struct hb_set_t
|
||||||
if (!resize (count))
|
if (!resize (count))
|
||||||
return;
|
return;
|
||||||
population = other->population;
|
population = other->population;
|
||||||
memcpy (pages, other->pages, count * pages.item_size);
|
memcpy ((void *) pages, (const void *) other->pages, count * pages.item_size);
|
||||||
memcpy (page_map, other->page_map, count * page_map.item_size);
|
memcpy ((void *) page_map, (const void *) other->page_map, count * page_map.item_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool is_equal (const hb_set_t *other) const
|
inline bool is_equal (const hb_set_t *other) const
|
||||||
|
|
|
@ -77,7 +77,7 @@ _subset2 (hb_subset_plan_t *plan)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
retry:
|
retry:
|
||||||
hb_serialize_context_t serializer (buf, buf_size);
|
hb_serialize_context_t serializer ((void *) buf, buf_size);
|
||||||
hb_subset_context_t c (plan, &serializer);
|
hb_subset_context_t c (plan, &serializer);
|
||||||
result = table->subset (&c);
|
result = table->subset (&c);
|
||||||
if (serializer.ran_out_of_room)
|
if (serializer.ran_out_of_room)
|
||||||
|
|
|
@ -101,8 +101,8 @@ struct hb_vector_t
|
||||||
inline hb_sorted_array_t<const Type> as_sorted_array (void) const
|
inline hb_sorted_array_t<const Type> as_sorted_array (void) const
|
||||||
{ return hb_sorted_array (arrayZ(), len); }
|
{ return hb_sorted_array (arrayZ(), len); }
|
||||||
|
|
||||||
template <typename T> inline operator T * (void) { return arrayZ(); }
|
template <typename T> explicit_operator inline operator T * (void) { return arrayZ(); }
|
||||||
template <typename T> inline operator const T * (void) const { return arrayZ(); }
|
template <typename T> explicit_operator inline operator const T * (void) const { return arrayZ(); }
|
||||||
|
|
||||||
inline Type * operator + (unsigned int i) { return arrayZ() + i; }
|
inline Type * operator + (unsigned int i) { return arrayZ() + i; }
|
||||||
inline const Type * operator + (unsigned int i) const { return arrayZ() + i; }
|
inline const Type * operator + (unsigned int i) const { return arrayZ() + i; }
|
||||||
|
|
Loading…
Reference in New Issue