Jacek Caban : d3dcompiler_43: Removed no longer needed wine_rb_init error handling.
Alexandre Julliard
julliard at winehq.org
Fri Sep 2 11:41:43 CDT 2016
Module: wine
Branch: master
Commit: 907854d4a26d015df038ab43f5ec3a32cd06c9d6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=907854d4a26d015df038ab43f5ec3a32cd06c9d6
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Aug 30 21:31:35 2016 +0200
d3dcompiler_43: Removed no longer needed wine_rb_init error handling.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dcompiler_43/reflection.c | 6 +-----
dlls/d3dcompiler_43/utils.c | 24 ++++--------------------
2 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index e2955f0..ff67d7b 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -1686,11 +1686,7 @@ static HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_refl
reflection->ID3D11ShaderReflection_iface.lpVtbl = &d3dcompiler_shader_reflection_vtbl;
reflection->refcount = 1;
- if (wine_rb_init(&reflection->types, &d3dcompiler_shader_reflection_type_rb_functions) == -1)
- {
- ERR("Failed to initialize type rbtree.\n");
- return E_FAIL;
- }
+ wine_rb_init(&reflection->types, &d3dcompiler_shader_reflection_type_rb_functions);
hr = dxbc_parse(data, data_size, &src_dxbc);
if (FAILED(hr))
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index e131d99..ddf64e4 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1734,12 +1734,7 @@ void push_scope(struct hlsl_parse_ctx *ctx)
}
TRACE("Pushing a new scope\n");
list_init(&new_scope->vars);
- if (wine_rb_init(&new_scope->types, &hlsl_type_rb_funcs) == -1)
- {
- ERR("Failed to initialize types rbtree.\n");
- d3dcompiler_free(new_scope);
- return;
- }
+ wine_rb_init(&new_scope->types, &hlsl_type_rb_funcs);
new_scope->upper = ctx->cur_scope;
ctx->cur_scope = new_scope;
list_add_tail(&ctx->scopes, &new_scope->entry);
@@ -1875,8 +1870,7 @@ static const struct wine_rb_functions function_rb_funcs =
void init_functions_tree(struct wine_rb_tree *funcs)
{
- if (wine_rb_init(&hlsl_ctx.functions, &function_rb_funcs) == -1)
- ERR("Failed to initialize functions rbtree.\n");
+ wine_rb_init(&hlsl_ctx.functions, &function_rb_funcs);
}
static const char *debug_base_type(const struct hlsl_type *type)
@@ -2513,11 +2507,7 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu
TRACE("Function %s redeclared as a user defined function.\n", debugstr_a(name));
func->intrinsic = intrinsic;
wine_rb_destroy(&func->overloads, free_function_decl_rb, NULL);
- if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1)
- {
- ERR("Failed to initialize function rbtree.\n");
- return;
- }
+ wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs);
}
decl->func = func;
if ((old_entry = wine_rb_get(&func->overloads, decl->parameters)))
@@ -2540,13 +2530,7 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu
}
func = d3dcompiler_alloc(sizeof(*func));
func->name = name;
- if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1)
- {
- ERR("Failed to initialize function rbtree.\n");
- d3dcompiler_free(name);
- d3dcompiler_free(func);
- return;
- }
+ wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs);
decl->func = func;
wine_rb_put(&func->overloads, decl->parameters, &decl->entry);
func->intrinsic = intrinsic;
More information about the wine-cvs
mailing list