Re: [PATCH 3/3] [Msacm32]: in acmFormatChoose, added support for template

2012-08-13 Thread Eric Pouech

Le 13/08/2012 09:51, Dmitry Timoshkov a écrit :

Eric Pouech  wrote:


It would look much better without all those 'ret' + 'else' things.

well, wine doesn't have coding guidelines...
so I don't know what "look much better" means (project wise)

For this particalr patch it means:

1. less code
2. simpler code
3. more readable code

and has nothing to do with coding guidelines for the whole project.

P.S.
I didn't even ask about the point in adding a bunch of spaces between
'MMRESULT' and 'ret' :)


feel free to do it. I won't
A+



Re: [PATCH 3/3] [Msacm32]: in acmFormatChoose, added support for template

2012-08-13 Thread Dmitry Timoshkov
Eric Pouech  wrote:

> > It would look much better without all those 'ret' + 'else' things.
> well, wine doesn't have coding guidelines...
> so I don't know what "look much better" means (project wise)

For this particalr patch it means:

1. less code
2. simpler code
3. more readable code

and has nothing to do with coding guidelines for the whole project.

P.S.
I didn't even ask about the point in adding a bunch of spaces between
'MMRESULT' and 'ret' :)

-- 
Dmitry.




Re: [PATCH 3/3] [Msacm32]: in acmFormatChoose, added support for template

2012-08-13 Thread Eric Pouech
> It would look much better without all those 'ret' + 'else' things.
well, wine doesn't have coding guidelines...
so I don't know what "look much better" means (project wise)

A+
-- 
Eric Pouech




Re: [PATCH 3/3] [Msacm32]: in acmFormatChoose, added support for template

2012-08-12 Thread Dmitry Timoshkov
Eric Pouech  wrote:

>  MMRESULT WINAPI acmFormatChooseW(PACMFORMATCHOOSEW pafmtc)
>  {
> -return DialogBoxParamW(MSACM_hInstance32, 
> MAKEINTRESOURCEW(DLG_ACMFORMATCHOOSE_ID),
> -   pafmtc->hwndOwner, FormatChooseDlgProc, 
> (LPARAM)pafmtc);
> +MMRESULTret;
> +
> +if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE)
> +ret = DialogBoxIndirectParamW(MSACM_hInstance32, 
> (LPCDLGTEMPLATEW)pafmtc->hInstance,
> +  pafmtc->hwndOwner, 
> FormatChooseDlgProc, (LPARAM)pafmtc);
> +else if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE)
> +ret = DialogBoxParamW(pafmtc->hInstance, pafmtc->pszTemplateName,
> +  pafmtc->hwndOwner, FormatChooseDlgProc, 
> (LPARAM)pafmtc);
> +else
> +ret = DialogBoxParamW(MSACM_hInstance32, 
> MAKEINTRESOURCEW(DLG_ACMFORMATCHOOSE_ID),
> +  pafmtc->hwndOwner, FormatChooseDlgProc, 
> (LPARAM)pafmtc);
> +return ret;
>  }

It would look much better without all those 'ret' + 'else' things.

-- 
Dmitry.