From: Behdad Esfahbod Date: Thu, 5 May 2011 18:47:53 +0000 (-0400) Subject: Move code around X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21d2c92fdf7307c7117f8948021f0dd7d5a5d2a3;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Move code around --- diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index ffe87b4..1add2e7 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -106,20 +106,20 @@ typedef struct { /* XXX make this thread-safe, somehow! */ -struct hb_user_data_t { - hb_user_data_key_t *key; - void *data; - hb_destroy_func_t destroy; +struct hb_user_data_array_t { - inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; } - inline bool operator == (hb_user_data_t &other) const { return key == other.key; } + struct hb_user_data_item_t { + hb_user_data_key_t *key; + void *data; + hb_destroy_func_t destroy; - void finish (void) { if (destroy) destroy (data); } -}; + inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; } + inline bool operator == (hb_user_data_item_t &other) const { return key == other.key; } -struct hb_user_data_array_t { + void finish (void) { if (destroy) destroy (data); } + }; - hb_set_t items; + hb_set_t items; inline bool set (hb_user_data_key_t *key, void * data, @@ -131,13 +131,13 @@ struct hb_user_data_array_t { items.remove (key); return true; } - hb_user_data_t user_data = {key, data, destroy}; - return items.insert (user_data); + hb_user_data_item_t item = {key, data, destroy}; + return items.insert (item); } inline void *get (hb_user_data_key_t *key) { - hb_user_data_t *user_data = items.get (key); - return user_data ? user_data->data : NULL; + hb_user_data_item_t *item = items.get (key); + return item ? item->data : NULL; } void finish (void) { items.finish (); }