On 21 April 2013 16:51, Stefan Dösinger stefan@codeweavers.com wrote:
- if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB)
sample_flags |= WINED3D_GLSL_SAMPLE_RECT;
- if (priv->cur_ps_args->np2_fixup & (1 << sampler_idx))
- {
sample_flags |= WINED3D_GLSL_SAMPLE_NPOT;
- }
I don't think the added braces are an improvement, but otherwise this looks ok.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-04-22 14:42, schrieb Henri Verbeet:> On 21 April 2013 16:51, Stefan Dösinger stefan@codeweavers.com wrote:
- if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB)
sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if
(priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + { + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; + }
I don't think the added braces are an improvement, but otherwise
this looks ok. Personally I don't like ifs without braces if either the condition or the instruction is spread over more than one line.
Afaics the code isn't quite consistent in either direction. I can resend the patch without the braces if you disagree.
On 22 April 2013 14:48, Stefan Dösinger stefan@codeweavers.com wrote:
Personally I don't like ifs without braces if either the condition or the instruction is spread over more than one line.
Well, I do disagree, but note that that reasoning doesn't actually apply here, both are single-line.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-04-22 14:54, schrieb Henri Verbeet:
On 22 April 2013 14:48, Stefan Dösinger stefan@codeweavers.com wrote:
Personally I don't like ifs without braces if either the condition or the instruction is spread over more than one line.
Well, I do disagree, but note that that reasoning doesn't actually apply here, both are single-line.
Oh right, I changed that from a first version of the patch before sending.
/me bangs head against wall and will resend.