[PATCH] winex11: Avoid double initialization of variables in OpenGL functions.
matteo.mystral at gmail.com
Wed Nov 4 16:57:07 CST 2015
2015-11-04 20:52 GMT+01:00 Alex Henrie <alexhenrie24 at gmail.com>:
> 2015-11-04 12:22 GMT-07:00 Vincent Povirk <vincent at codeweavers.com>:
>> Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
>> Although I don't see anything wrong with 'get_render_type_from_fbconfig' as-is.
> I moved the render_type = 0 assignment into a conditional branch. If
> there was not a default case in that function already, it would not
> have made a difference, because a jump instruction takes the same
> amount of time or more as zeroing out a variable. But since we already
> have the conditional, it makes more sense to move the initialization
> into that conditional branch to avoid the cost of initializing the
> variable unnecessarily.
I doubt that actually modifies the generated code, although that's
probably true for all the changes in this patch. The other changes at
least simplify the code a bit.
Anyway, the patch is okay with me FWIW.
More information about the wine-devel