d3dx9 [patch 1/2, try 4]: Implement D3DXCreatePolygon

Rico Schüller kgbricola at web.de
Fri Nov 11 03:25:33 CST 2011


Am 10.11.2011 10:59, schrieb David Adam:
> Hello,
>
> I tried to fix the remaining issues pointed by Matteo and Rico.
> I kept the style of Misha Koshelev who already implemented many shapes in
> the mesh.c file.
>
> Any more suggestions?
>
> David
>
>
>
Hi David,

I still have some suggestions. Please review all TRACE and ok messages. 
I think they should mostly end with '\n' and they should not contain 
"useless" chars like ':' and spaces where not needed.

Also you may save the ref value from the call before you compare it:
+    IDirect3DDevice9_Release(device);
+    ok(ref == 0, "Expected refcount = 0, received %d", ref);
I think it is pretty useful to check the reference count in general for 
all release calls. Please review that part, so that it does what it 
should do! It's not only the line I mentioned as an example here! If you 
don't understand some parts and don't know exactly what to do, please ask.

I'd prefer if the comparison would be within the if, otherwise you could 
compare to an uninitialized value, which could get bogus results (even 
if that only happens when other test fail, I think it's better than 
comparing uninitialized values):
+    if (polygon) ref = polygon->lpVtbl->Release(polygon);
+    ok(ref == 0, "Expected refcount = 0, received %d", ref);

Please see my points as a suggestion. I think the answers to the patches 
showed a lot of issues, so please review the whole patch before sending 
it again, you may find some other not mentioned things. Note: Not the 
fastest sent patch will get in, but the "best" working solution.

Cheers
Rico



More information about the wine-devel mailing list