[PATCH] dinput: mouse.c: extracted the warping code into a function, got rid from goto's in alloc_device, and made the code more readable. (no change in functionality)

Vitaliy Margolen wine-devel at kievinfo.com
Sat Dec 15 00:18:35 CST 2007


There is nothing to maintain in that warping code. It needs to be removed 
you right. But you can do that only after x11drv can properly warp mouse 
itself (and keep it from leaving Wine window).

And for format only changes - read that link. It explains what type of 
changes you should not send.

Vitaliy.

Adam Rimon wrote:
> Using gotos is ok, when it's really needed. There is no need to use 
> gotos here - it doesn't save source lines.
> Why are you against changing the format and fixing the mixed using of 
> tabs and white spaces?
> Anyway, extracting the warping code into a function makes the warping 
> code more maintainable.
> 
> On 12/14/2007 11:07 PM, Vitaliy Margolen wrote:
>> First of all your patch is wrapped. Second, do not send white space 
>> changes only. Same for formatting - do not change formatting only. If 
>> you can't read it, reformat for yourself, or get used to reading some 
>> one else's code.
>>
>> What's wrong with gotos? If you don't like it doesn't mean everyone 
>> else can't use them. Don't change that part. Copying 10 lines of code 
>> into 10 places doesn't justify removing 10 lines of code.
>>
>> You should probably check the patch requirements: 
>> http://winehq.org/site/sending_patches
>>
>> Vitaliy.
>>
>> Adam Rimon wrote:
>>> ---
>>>
>>>  dlls/dinput/mouse.c |  415 
>>> +++++++++++++++++++++++++++++----------------------
>>>  1 files changed, 235 insertions(+), 180 deletions(-)
>>>
>>
> 




More information about the wine-devel mailing list