[1/8] [d3d8] validate pool type in CreateVolumeTexture

Stefan Dösinger stefan at codeweavers.com
Mon Jul 14 23:48:05 CDT 2008


> +    if ((DWORD)(Pool) >= 4) {
> +        ERR("(%p) Called with invalid pool type\n", This);
> +        return D3DERR_INVALIDCALL;
> +    }
You could use if(Pool != D3DPOOL_DEFAULT && Pool != MANAGED ...) instead
of comparing to the arbitary value "4". The compiler should figure that out and generate a >= 4 for better efficiency, but even if not it doesn't hurt because Create* isn't performance critical.





More information about the wine-patches mailing list