Try fixing MSVC builds

pull/4578/head
Behdad Esfahbod 1 year ago
parent fa9dc530fc
commit ef04b5c259
  1. 10
      src/hb-iter.hh
  2. 22
      src/hb-open-type.hh

@ -324,6 +324,16 @@ struct hb_is_sink_of
(hb_is_source_of(Iter, Item) && Iter::is_sorted_iterator)
struct
{
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>
unsigned operator () (const Iterable &_) const { return hb_len (hb_iter (_)); }
unsigned operator () (unsigned _) const { return _; }
}
HB_FUNCOBJ (hb_len_of);
/* Range-based 'for' for iterables. */
template <typename Iterable,

@ -1249,16 +1249,6 @@ struct VarSizedBinSearchArrayOf
template <typename COUNT>
struct CFFIndex
{
struct length_f_t
{
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>
unsigned operator () (const Iterable &_) const { return hb_len (hb_iter (_)); }
unsigned operator () (unsigned _) const { return _; }
}
HB_FUNCOBJ (length_f);
unsigned int offset_array_size () const
{ return offSize * (count + 1); }
@ -1325,7 +1315,7 @@ struct CFFIndex
for (const auto &_ : +it)
{
set_offset_at (i++, offset);
offset += length_f (_);
offset += hb_len_of (_);
}
set_offset_at (i, offset);
}
@ -1338,7 +1328,7 @@ struct CFFIndex
for (const auto &_ : +it)
{
*p++ = offset;
offset += length_f (_);
offset += hb_len_of (_);
}
*p = offset;
}
@ -1349,7 +1339,7 @@ struct CFFIndex
for (const auto &_ : +it)
{
*p++ = offset;
offset += length_f (_);
offset += hb_len_of (_);
}
*p = offset;
}
@ -1360,7 +1350,7 @@ struct CFFIndex
for (const auto &_ : +it)
{
*p++ = offset;
offset += length_f (_);
offset += hb_len_of (_);
}
*p = offset;
}
@ -1371,7 +1361,7 @@ struct CFFIndex
for (const auto &_ : +it)
{
*p++ = offset;
offset += length_f (_);
offset += hb_len_of (_);
}
*p = offset;
}
@ -1397,7 +1387,7 @@ struct CFFIndex
unsigned total = 0;
for (const auto &_ : +it)
total += length_f (_);
total += hb_len_of (_);
if (data_size) *data_size = total;

Loading…
Cancel
Save