summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh55
1 files changed, 27 insertions, 28 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
index 4e99df0eb55..9f49af17810 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set-digest.hh
@@ -50,26 +50,23 @@ struct hb_set_digest_lowest_bits_t
{
enum { mask_bytes = sizeof (mask_t) };
enum { mask_bits = sizeof (mask_t) * 8 };
- static const unsigned int num_bits = 0
- + (mask_bytes >= 1 ? 3 : 0)
- + (mask_bytes >= 2 ? 1 : 0)
- + (mask_bytes >= 4 ? 1 : 0)
- + (mask_bytes >= 8 ? 1 : 0)
- + (mask_bytes >= 16? 1 : 0)
- + 0;
+ enum { num_bits = 0
+ + (mask_bytes >= 1 ? 3 : 0)
+ + (mask_bytes >= 2 ? 1 : 0)
+ + (mask_bytes >= 4 ? 1 : 0)
+ + (mask_bytes >= 8 ? 1 : 0)
+ + (mask_bytes >= 16? 1 : 0)
+ + 0 };
static_assert ((shift < sizeof (hb_codepoint_t) * 8), "");
static_assert ((shift + num_bits <= sizeof (hb_codepoint_t) * 8), "");
- inline void init (void) {
- mask = 0;
- }
+ void init () { mask = 0; }
- inline void add (hb_codepoint_t g) {
- mask |= mask_for (g);
- }
+ void add (hb_codepoint_t g) { mask |= mask_for (g); }
- inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
+ bool add_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
if ((b >> shift) - (a >> shift) >= mask_bits - 1)
mask = (mask_t) -1;
else {
@@ -81,7 +78,7 @@ struct hb_set_digest_lowest_bits_t
}
template <typename T>
- inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
for (unsigned int i = 0; i < count; i++)
{
@@ -90,7 +87,7 @@ struct hb_set_digest_lowest_bits_t
}
}
template <typename T>
- inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
for (unsigned int i = 0; i < count; i++)
{
@@ -100,51 +97,53 @@ struct hb_set_digest_lowest_bits_t
return true;
}
- inline bool may_have (hb_codepoint_t g) const {
- return !!(mask & mask_for (g));
- }
+ bool may_have (hb_codepoint_t g) const
+ { return !!(mask & mask_for (g)); }
private:
- static inline mask_t mask_for (hb_codepoint_t g) {
- return ((mask_t) 1) << ((g >> shift) & (mask_bits - 1));
- }
+ static mask_t mask_for (hb_codepoint_t g)
+ { return ((mask_t) 1) << ((g >> shift) & (mask_bits - 1)); }
mask_t mask;
};
template <typename head_t, typename tail_t>
struct hb_set_digest_combiner_t
{
- inline void init (void) {
+ void init ()
+ {
head.init ();
tail.init ();
}
- inline void add (hb_codepoint_t g) {
+ void add (hb_codepoint_t g)
+ {
head.add (g);
tail.add (g);
}
- inline bool add_range (hb_codepoint_t a, hb_codepoint_t b) {
+ bool add_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
head.add_range (a, b);
tail.add_range (a, b);
return true;
}
template <typename T>
- inline void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
head.add_array (array, count, stride);
tail.add_array (array, count, stride);
}
template <typename T>
- inline bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(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;
}
- inline bool may_have (hb_codepoint_t g) const {
+ bool may_have (hb_codepoint_t g) const
+ {
return head.may_have (g) && tail.may_have (g);
}