From b4f43e372ed21a32d571c31ac5999abbb51760a8 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 29 Aug 2008 02:12:10 +0200 Subject: [PATCH] wined3d: Remove useless hash_table_t typedef. --- dlls/wined3d/ati_fragment_shader.c | 2 +- dlls/wined3d/utils.c | 22 +++++++++++----------- dlls/wined3d/wined3d_private.h | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 97875c7362f..20c4ebef495 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -50,7 +50,7 @@ struct atifs_ffp_desc struct atifs_private_data { - hash_table_t *fragment_shaders; /* A hashtable to track fragment pipeline replacement shaders */ + struct hash_table_t *fragment_shaders; /* A hashtable to track fragment pipeline replacement shaders */ }; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index a577e28a132..31a1944cc32 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1564,12 +1564,12 @@ BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4] /* Hash table functions */ -hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function) +struct hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function) { - hash_table_t *table; + struct hash_table_t *table; unsigned int initial_size = 8; - table = HeapAlloc(GetProcessHeap(), 0, sizeof(hash_table_t) + (initial_size * sizeof(struct list))); + table = HeapAlloc(GetProcessHeap(), 0, sizeof(struct hash_table_t) + (initial_size * sizeof(struct list))); if (!table) { ERR("Failed to allocate table, returning NULL.\n"); @@ -1607,7 +1607,7 @@ hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function return table; } -void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb) +void hash_table_destroy(struct hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb) { unsigned int i = 0; @@ -1624,7 +1624,7 @@ void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, voi HeapFree(GetProcessHeap(), 0, table); } -static inline struct hash_table_entry_t *hash_table_get_by_idx(hash_table_t *table, void *key, unsigned int idx) +static inline struct hash_table_entry_t *hash_table_get_by_idx(struct hash_table_t *table, void *key, unsigned int idx) { struct hash_table_entry_t *entry; @@ -1635,7 +1635,7 @@ static inline struct hash_table_entry_t *hash_table_get_by_idx(hash_table_t *tab return NULL; } -static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count) +static BOOL hash_table_resize(struct hash_table_t *table, unsigned int new_bucket_count) { unsigned int new_entry_count = 0; struct hash_table_entry_t *new_entries; @@ -1694,7 +1694,7 @@ static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count return TRUE; } -void hash_table_put(hash_table_t *table, void *key, void *value) +void hash_table_put(struct hash_table_t *table, void *key, void *value) { unsigned int idx; unsigned int hash; @@ -1767,12 +1767,12 @@ void hash_table_put(hash_table_t *table, void *key, void *value) ++table->count; } -void hash_table_remove(hash_table_t *table, void *key) +void hash_table_remove(struct hash_table_t *table, void *key) { hash_table_put(table, key, NULL); } -void *hash_table_get(hash_table_t *table, void *key) +void *hash_table_get(struct hash_table_t *table, void *key) { unsigned int idx; struct hash_table_entry_t *entry; @@ -2004,11 +2004,11 @@ void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *setting } #undef GLINFO_LOCATION -struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings) +struct ffp_desc *find_ffp_shader(struct hash_table_t *fragment_shaders, struct ffp_settings *settings) { return (struct ffp_desc *)hash_table_get(fragment_shaders, settings);} -void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc) { +void add_ffp_shader(struct hash_table_t *shaders, struct ffp_desc *desc) { struct ffp_settings *key = HeapAlloc(GetProcessHeap(), 0, sizeof(*key)); /* Note that the key is the implementation independent part of the ffp_desc structure, * whereas desc points to an extended structure with implementation specific parts. diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 897e65482d3..f4b81f7b27e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -54,7 +54,7 @@ struct hash_table_entry_t { struct list entry; }; -typedef struct { +struct hash_table_t { hash_function_t *hash_function; compare_function_t *compare_function; struct list *buckets; @@ -65,13 +65,13 @@ typedef struct { unsigned int count; unsigned int grow_size; unsigned int shrink_size; -} hash_table_t; +}; -hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function); -void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb); -void *hash_table_get(hash_table_t *table, void *key); -void hash_table_put(hash_table_t *table, void *key, void *value); -void hash_table_remove(hash_table_t *table, void *key); +struct hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function); +void hash_table_destroy(struct hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb); +void *hash_table_get(struct hash_table_t *table, void *key); +void hash_table_put(struct hash_table_t *table, void *key, void *value); +void hash_table_remove(struct hash_table_t *table, void *key); /* Device caps */ #define MAX_PALETTES 65536 @@ -257,7 +257,7 @@ extern const shader_backend_t none_shader_backend; /* GLSL shader private data */ struct shader_glsl_priv { - hash_table_t *glsl_program_lookup; + struct hash_table_t *glsl_program_lookup; struct glsl_shader_prog_link *glsl_program; GLhandleARB depth_blt_glsl_program_id; }; @@ -269,7 +269,7 @@ struct shader_arb_priv { GLuint depth_blt_vprogram_id; GLuint depth_blt_fprogram_id; BOOL use_arbfp_fixed_func; - hash_table_t *fragment_shaders; + struct hash_table_t *fragment_shaders; }; /* X11 locking */ @@ -795,8 +795,8 @@ struct ffp_desc }; void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *settings, BOOL ignore_textype); -struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings); -void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc); +struct ffp_desc *find_ffp_shader(struct hash_table_t *fragment_shaders, struct ffp_settings *settings); +void add_ffp_shader(struct hash_table_t *shaders, struct ffp_desc *desc); BOOL ffp_program_key_compare(void *keya, void *keyb); unsigned int ffp_program_key_hash(void *key);