""Luis C. Busquets Pérez"" <[EMAIL PROTECTED]> 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. 



Reply via email to