include: Add an inline version of CopyRect() too.

Michael Stefaniuc mstefani at redhat.com
Tue Jun 21 10:19:15 CDT 2016


On 06/21/2016 05:01 PM, Alexandre Julliard wrote:
> Michael Stefaniuc <mstefani at redhat.de> writes:
> 
>> Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
>> ---
>> Around 95 use cases.
>> No, I do *not* want to do change RECT struct assignments to CopyRect().
> 
> Good, but how about changing CopyRect to assignments? ;-)
Actually I lied! ;)

I wanted to write a script to check for code similar to:
    if (!r1 || !r2) goto END;
    *r1 = *r2;
and replace it with
    if (!CopyRect(r1, r2)) goto END;

Mainly because it is an interesting coccinelle exercise. Of course I
would have tried to make it more palatable by replacing those cases
where memcpy() is used instead of the assignment...

But the explicit code is not such a big eyesore. So I can instead remove
CopyRect() and mark it as verboten when __WINESOURCE__ is defined.

bye
	michael



More information about the wine-devel mailing list