RE: general question..

2008-07-22 Thread Stefan Dösinger
> The bigger question is why there is a huge if-else statement, and why > this function is so large. > Huge if-else statement = 2 sub-functions > > Shader dirty constants - do shader internals really belong here ? Well, in ARB shader constants are a context global state, opposed to GLSL where they

Re: general question..

2008-07-22 Thread Chris Ahrendt
Vitaliy Margolen wrote: > Chris Ahrendt wrote: >>fail: >> if(wined3d_fake_gl_context_hdc) >> ReleaseDC(wined3d_fake_gl_context_hwnd, >> wined3d_fake_gl_context_hdc); >> wined3d_fake_gl_context_hdc = NULL; >> if(wined3d_fake_gl_context_hwnd) >> DestroyWindow(win

Re: general question..

2008-07-21 Thread Vitaliy Margolen
Chris Ahrendt wrote: > Ivan Gyurdiev wrote: >> Ivan Gyurdiev wrote: >>> James Hawkins wrote: > context.c - same except in this case its just a return with noting > else.. > why do a goto why not just do the return? > This is probably ok to change. I can only imagine that the o

Re: general question..

2008-07-21 Thread Vitaliy Margolen
Chris Ahrendt wrote: >fail: > if(wined3d_fake_gl_context_hdc) > ReleaseDC(wined3d_fake_gl_context_hwnd, > wined3d_fake_gl_context_hdc); > wined3d_fake_gl_context_hdc = NULL; > if(wined3d_fake_gl_context_hwnd) > DestroyWindow(wined3d_fake_gl_context_hwnd); >

Re: general question..

2008-07-21 Thread Chris Ahrendt
Ivan Gyurdiev wrote: > Ivan Gyurdiev wrote: >> James Hawkins wrote: context.c - same except in this case its just a return with noting else.. why do a goto why not just do the return? >>> >>> This is probably ok to change. I can only imagine that the original >>> author thought

Re: general question..

2008-07-21 Thread Ivan Gyurdiev
Ivan Gyurdiev wrote: > James Hawkins wrote: >>> context.c - same except in this case its just a return with noting >>> else.. >>> why do a goto why not just do the return? >>> >> >> This is probably ok to change. I can only imagine that the original >> author thought there might be cleanup needed

Re: general question..

2008-07-21 Thread Chris Ahrendt
Ivan Gyurdiev wrote: > James Hawkins wrote: >>> context.c - same except in this case its just a return with noting >>> else.. >>> why do a goto why not just do the return? >>> >>> >> >> This is probably ok to change. I can only imagine that the original >> author thought there might be clean

Re: general question..

2008-07-21 Thread Ivan Gyurdiev
James Hawkins wrote: >> context.c - same except in this case its just a return with noting else.. >> why do a goto why not just do the return? >> >> > > This is probably ok to change. I can only imagine that the original > author thought there might be cleanup needed at some later point. >

Re: general question..

2008-07-21 Thread Chris Ahrendt
Stefan Dösinger wrote: > Can you give some examples of such code? Nobody here is a goto-maniac, but > in all cases I know the goto is used for a good reason. Most of the time it > is used for error path to avoid ugly if() nesting and/or code duplication > when freeing partially allocated objects >

Re: general question..

2008-07-21 Thread James Hawkins
On Mon, Jul 21, 2008 at 9:24 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > > Well here is my list so far : > > device.c - filled with goto's if you need the routines I can supply them... > they can be moved to a routine and called... > wine$ find . -name "device.c" ./dlls/ddraw/device.c ./dlls/di

RE: general question..

2008-07-21 Thread Stefan Dösinger
Can you give some examples of such code? Nobody here is a goto-maniac, but in all cases I know the goto is used for a good reason. Most of the time it is used for error path to avoid ugly if() nesting and/or code duplication when freeing partially allocated objects > -Original Message- >

Re: general question..

2008-07-21 Thread James Hawkins
On Mon, Jul 21, 2008 at 8:41 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > As I have been going through trying to debug the everquest2 issues on my > machine I have run into a few places where I think the code should be > changed a little ( this alot of times is where there is a GOTO in the > code