[D3D9 1/8] Remove const qualifier on state_test data

Alexandre Julliard julliard at winehq.org
Thu Oct 5 02:14:10 CDT 2006


Ivan Gyurdiev <ivg231 at gmail.com> writes:

> It's already marked const in the parameters of the set and get
> functions, which means it can't be modified there (arg 3):
> +    void (*set_handler) (IDirect3DDevice9* device, const struct
> state_test* test, const void* data_in);
> +    void (*get_handler) (IDirect3DDevice9* device, const struct
> state_test* test, const void* data_out);

Which is precisely why the data pointers have to be const too. Since
the tests don't modify anything, it must be possible to give them
constant data. With your scheme you need to cast const off, which is
ugly and will cause compiler warnings.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list