[PATCH 7/7] ddraw: Fix remaining style issues in executebuffer.c

Henri Verbeet hverbeet at gmail.com
Mon Oct 31 08:36:07 CDT 2016


On 30 October 2016 at 15:02, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> Feel free to ignore this. With this the file follows the wined3d style,
> unless I missed something...

> +static void _dump_executedata(const D3DEXECUTEDATA *lpData)
Naming conventions for "_dump_executedata" and "lpData".

>      TRACE("dwSize : %d\n", lpData->dwSize);
%u for unsigned integers, punctuation.

> -static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
> +static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc)
> +{
>      TRACE("dwSize       : %d\n", lpDesc->dwSize);
Likewise.

>      TRACE("dwFlags      : %x\n", lpDesc->dwFlags);
%#x for hexadecimal values.

> @@ -76,12 +78,12 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
>      for (;;)
>      {
>          D3DINSTRUCTION *current = (D3DINSTRUCTION *)instr;
Should probably be const.

> -       BYTE size;
> -       WORD count;
> -
> -       count = current->wCount;
> -       size = current->bSize;
> -       instr += sizeof(D3DINSTRUCTION);
> +        BYTE size;
> +        WORD count;
> +
> +        count = current->wCount;
> +        size = current->bSize;
> +        instr += sizeof(D3DINSTRUCTION);
"sizeof(*current)"

>                                  instr = (char*)current + ci->dwOffset;
"(char *)"

> +            default:
> +                ERR("Unhandled OpCode %d !!!\n",current->bOpcode);
Should probably use %#x. Punctuation.

Some of these probably deserve a patch on their own, and there may
very well be more issues.



More information about the wine-devel mailing list