d3dx8: Implementation of WINAPI D3DXAssembleShaderFromFileA
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Nov 26 21:16:26 CST 2007
""Luis C. Busquets Pérez"" <luis.busquets at ilidium.com> wrote:
> Changed the if clauses to make the implementation more readable.
...
> + if ( !pSrcFile )
> + return D3DXERR_INVALIDDATA;
> + else
> + {
> + len = MultiByteToWideChar( CP_ACP, 0, pSrcFile, -1, NULL, 0 );
> + pSrcFileW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
> + MultiByteToWideChar( CP_ACP, 0, pSrcFile, -1, pSrcFileW, len );
> + ret=D3DXAssembleShaderFromFileW(pSrcFileW, Flags, ppConstants, ppCompiledShader, ppCompilationErrors);
> + HeapFree( GetProcessHeap(), 0, pSrcFileW );
> + return ret;
> + }
> }
This is not more readable than a previous version. There is no need
for 'else {}' construct and therefore for additional indentation level
at all.
--
Dmitry.
More information about the wine-devel
mailing list