d3d: avoid implicit conversion warnings from identical enumeration types D3DPOOL and WINED3DPOOL (Clang)

Frédéric Delanoy frederic.delanoy at gmail.com
Mon May 16 07:30:48 CDT 2011


2011/5/16 Henri Verbeet <hverbeet at gmail.com>:
> 2011/5/16 Frédéric Delanoy <frederic.delanoy at gmail.com>:
>> Indeed. I'm checking a couple of other automatic non-checked enum
>> conversions, and those can be problematic; e.g. D3DRESOURCETYPE and
>> WINED3DRESOURCETYPE are not identical but are autoconverted without
>> any kind of check.
>>
> The resource type handling in e.g. d3d9 is really ugly, but should be
> safe in practice. IDirect3DCubeTexture9Impl_GetType() should only ever
> return D3DRTYPE_CUBETEXTURE for example.
>

Is there in that case no point in getting rid of those warnings by
adding conversion functions between those related-but-not-identical
enums?

Couldn't this help detect invalid enum values quicker instead of
passing them around unchecked?

Frédéric Delanoy



More information about the wine-devel mailing list