[PATCH 3/7] d3d8/tests: Add cursor size tests.

Henri Verbeet hverbeet at gmail.com
Mon Mar 30 11:00:38 CDT 2020

On Mon, 30 Mar 2020 at 11:49, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
> +        /* http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2 */
> +        if (width && !(width & (width - 1)) && height && !(height & (height - 1)))
URLs are best avoided, they're only rarely stable. In the general
case, for an algorithm, mention its name if any, its authors, and the
publication/standard. In the rare case that that's not an option,
there's archive.org. In this particular case though, I think this kind
of check is (or should be) common knowledge; we have that kind of
power-of-two check in plenty of places (e.g. wined3d_texture_init(),
wined3d_texture_update_desc()), and in its related version of an
alignment check in even more.

More information about the wine-devel mailing list