On 16 March 2016 at 21:34, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
clang didn't warn me about that. I should still fix it though. Does clang need -Wall for that warning to come?
-Wdeclaration-after-statement will probably work, but I'd be inclined to say "Just use gcc".
+IDirect3DRMTexture *IDirect3DRMTexture_from_impl(struct d3drm_texture *texture) +{
- return &texture->IDirect3DRMTexture_iface;
+}
+IDirect3DRMTexture2 *IDirect3DRMTexture2_from_impl(struct d3drm_texture *texture) +{
- return &texture->IDirect3DRMTexture2_iface;
+}
+IDirect3DRMTexture3 *IDirect3DRMTexture3_from_impl(struct d3drm_texture *texture) +{
- return &texture->IDirect3DRMTexture3_iface;
+}
I don't think these are an improvement, I'd prefer them just written out.
That's fine with me too, I kept them there for future use, but that doesn't seem to be the case. I should add these only if really required (like for devices).
They're not really required there either. It's nice to keep the struct d3drm_device definition local to device.c, but not at all costs. And I'd expect it to get harder and harder to keep it there once you start actually implementing things.