[set-digest] Minor no logic change

This commit is contained in:
Behdad Esfahbod 2022-11-16 14:15:58 -07:00
parent 95b9763dbc
commit 20654cd889
1 changed files with 4 additions and 6 deletions

View File

@ -136,9 +136,8 @@ struct hb_set_digest_combiner_t
bool add_range (hb_codepoint_t a, hb_codepoint_t b)
{
head.add_range (a, b);
tail.add_range (a, b);
return true;
return head.add_range (a, b) &&
tail.add_range (a, b);
}
template <typename T>
void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
@ -151,9 +150,8 @@ struct hb_set_digest_combiner_t
template <typename T>
bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
head.add_sorted_array (array, count, stride);
tail.add_sorted_array (array, count, stride);
return true;
return head.add_sorted_array (array, count, stride) &&
tail.add_sorted_array (array, count, stride);
}
template <typename T>
bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }