[v2 3/3] d3dx9: Compare parameter definition instead of parameter handle in IsParameterUsed().

Matteo Bruni matteo.mystral at gmail.com
Thu Apr 13 12:56:29 CDT 2017

2017-04-11 15:58 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:
> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
>     is_same_parameter() is defined this way (argument type and placement in the file)
>         for a more straightforward reuse later in shared parameters implementation.

> -            if (walk_state_dep(&pass->states[j], compare_param_ptr, param))
> +            if (walk_state_dep(&pass->states[j], (walk_parameter_dep_func)is_same_parameter, param))

The cast isn't nice though. Either change the signature of
is_same_parameter() to match walk_parameter_dep_func or, if that
really isn't an option, add a wrapper function with the correct
signature and use that here instead. Even if you prefer the latter,
it's probably better to do that only when you need it, in a later

More information about the wine-devel mailing list