[iter] Fix operator() impls
This commit is contained in:
parent
57795bc8dd
commit
d438e61042
|
@ -162,12 +162,13 @@ struct hb_map_t
|
|||
|
||||
static constexpr hb_codepoint_t INVALID = HB_MAP_VALUE_INVALID;
|
||||
|
||||
/* Map interface. */
|
||||
/* Has interface. */
|
||||
static constexpr hb_codepoint_t SENTINEL = INVALID;
|
||||
typedef hb_codepoint_t value_t;
|
||||
value_t operator [] (hb_codepoint_t k) const { return get (k); }
|
||||
bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
|
||||
bool operator () (hb_codepoint_t k) const { return has (k); }
|
||||
/* Projection. */
|
||||
hb_codepoint_t operator () (hb_codepoint_t k) const { return get (k); }
|
||||
|
||||
void clear ()
|
||||
{
|
||||
|
|
|
@ -1035,11 +1035,12 @@ struct CoverageFormat2
|
|||
|
||||
struct Coverage
|
||||
{
|
||||
/* Map interface. */
|
||||
/* Has interface. */
|
||||
static constexpr unsigned SENTINEL = NOT_COVERED;
|
||||
typedef unsigned int value_t;
|
||||
value_t operator [] (hb_codepoint_t k) const { return get (k); }
|
||||
bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
|
||||
/* Predicate. */
|
||||
bool operator () (hb_codepoint_t k) const { return has (k); }
|
||||
|
||||
unsigned int get (hb_codepoint_t k) const { return get_coverage (k); }
|
||||
|
@ -1480,12 +1481,13 @@ struct ClassDefFormat2
|
|||
|
||||
struct ClassDef
|
||||
{
|
||||
/* Map interface. */
|
||||
/* Has interface. */
|
||||
static constexpr unsigned SENTINEL = 0;
|
||||
typedef unsigned int value_t;
|
||||
value_t operator [] (hb_codepoint_t k) const { return get (k); }
|
||||
bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
|
||||
bool operator () (hb_codepoint_t k) const { return has (k); }
|
||||
/* Projection. */
|
||||
hb_codepoint_t operator () (hb_codepoint_t k) const { return get (k); }
|
||||
|
||||
unsigned int get (hb_codepoint_t k) const { return get_class (k); }
|
||||
unsigned int get_class (hb_codepoint_t glyph_id) const
|
||||
|
|
|
@ -365,11 +365,12 @@ struct hb_set_t
|
|||
return page->get (g);
|
||||
}
|
||||
|
||||
/* Map interface. */
|
||||
/* Has interface. */
|
||||
static constexpr bool SENTINEL = false;
|
||||
typedef bool value_t;
|
||||
value_t operator [] (hb_codepoint_t k) const { return get (k); }
|
||||
bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
|
||||
/* Predicate. */
|
||||
bool operator () (hb_codepoint_t k) const { return has (k); }
|
||||
|
||||
bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
|
||||
|
|
Loading…
Reference in New Issue