Several patches for D3DX
Luis Busquets
luis.busquets at ilidium.com
Sat Apr 12 11:11:05 CDT 2008
Thanks for your sincere response. I am aware that there are diverse
styles of writing the functions and all can be criticised: some for its
complexity, others for its unreadability, others for its length...
Anyway at this point in time , what I see as evident is that the three
implementations that I have submitted comply with their attached tests
and I have tried to include all the modifications proposed. Although in
my opinion the best would be to commit these patches and, if needed,
increase the beautiness of the code in particular direction later, for
me it is evident that it is not hard to implement these three functions
in one way or another.
Therefore, in the case that the implementations submitted are not liked,
please, I ask a more experienced programmer to submit his/her
implementations and commit them to the tree for these really trivial
functions (D3DXGetShaderVersion, D3DXGetShaderSize, D3DXGetFVFVertexSize).
James Hawkins escribió:
> On Fri, Apr 11, 2008 at 6:20 PM, Luis Busquets
> <luis.busquets at ilidium.com> wrote:
>
>> Is there still any problem with each of the attached patches or are they
>> going to be committed?
>>
>>
>
> +WINAPI DWORD D3DXGetShaderVersion(CONST DWORD *pFunction)
> +{
> + DWORD ver;
> + if (!pFunction)
> + {
> + return 0;
> + }
> + /* The first DWORD of the stream is the version Token */
> + ver=*pFunction;
> + return ver;
> +}
>
> I can't attest to any of the rest, but the style in this function is
> horrendous. Your spacing is all over the place. Also, correctness of
> this function aside, the function can be written so much simpler as:
>
> WINAPI DWORD D3DXGetShaderVersion(CONST DWORD *pFunction)
> {
> return (pFunction) ? *pFunction : 0;
> }
>
>
More information about the wine-devel
mailing list