[PATCH 2/2] d3dx9: Test penultimate declaration element in D3DXDeclaratorFromFVFTest.

Alexandre Julliard julliard at winehq.org
Wed Jul 7 09:08:06 CDT 2010


James McKenzie <jjmckenzie51 at earthlink.net> writes:

> Misha Koshelev wrote:
>> ---
>>  dlls/d3dx9_36/tests/mesh.c |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
>> index a2fb6d8..2952e23 100644
>> --- a/dlls/d3dx9_36/tests/mesh.c
>> +++ b/dlls/d3dx9_36/tests/mesh.c
>> @@ -262,7 +262,7 @@ static void D3DXDeclaratorFromFVFTest(void)
>>           if (hr == D3D_OK)
>>          {
>> -            for (i=0; i<4; i++)
>> +            for (i=0; i<5; i++)
>>   
> I don't know about everyone else here, but I prefer to use less than
> or equal to, which I think is what was intended here.   This
> positively states the upper bound, which is what I was taught in
> programming classes a long time ago (when ANSI C was still 89...)
>
> Thus this would be
>
> for (i=0; i<=4; i++)

There's no reason that this would be any better. Please don't give
advice based on folklore you heard in programming classes.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list