[PATCH 6/8] d3dx9: Factor out free_parameter_data() function.

Matteo Bruni matteo.mystral at gmail.com
Fri Apr 21 12:06:38 CDT 2017


2017-04-20 13:26 GMT+02:00 Paul Gofman <gofmanp at gmail.com>:

> +static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL child)
> +{
> +    unsigned int i;
> +
> +    TRACE("Free parameter %p, name %s, type %s, child %s\n", param, param->name,
> +            debug_d3dxparameter_type(param->type), child ? "yes" : "no");

Again, given that it's a chance for some cleanup, please add the
period at the end of the message. Also I'd change the "child" part,
either just using %#x or child ? "child" : "" (or something else, the
point being that the current "child yes" vs "child no" looks pretty
awkward).
Maybe you can also trace the "element" parameter.

> +    if (param->param_eval)
> +    {
> +        d3dx_free_param_eval(param->param_eval);
> +        param->param_eval = NULL;

Is setting the field to NULL necessary? Same for the others below.



More information about the wine-devel mailing list