Fix -Wambiguous-reversed-operator warning

Fixes https://github.com/harfbuzz/harfbuzz/issues/2554
This commit is contained in:
Behdad Esfahbod 2020-07-08 18:17:40 -05:00
parent 5ea11cb817
commit 6a45df0a54
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ struct hb_hashmap_t
void clear () { key = kINVALID; value = vINVALID; hash = 0; }
bool operator == (K o) { return hb_deref (key) == hb_deref (o); }
bool operator == (const K &o) { return hb_deref (key) == hb_deref (o); }
bool operator == (const item_t &o) { return *this == o.key; }
bool is_unused () const { return key == kINVALID; }
bool is_tombstone () const { return key != kINVALID && value == vINVALID; }

View File

@ -168,8 +168,8 @@ struct hb_user_data_array_t
void *data;
hb_destroy_func_t destroy;
bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; }
bool operator == (hb_user_data_item_t &other) const { return key == other.key; }
bool operator == (const hb_user_data_key_t *other_key) const { return key == other_key; }
bool operator == (const hb_user_data_item_t &other) const { return key == other.key; }
void fini () { if (destroy) destroy (data); }
};