On Thu, Jul 17, 2008 at 05:38:29PM -0700, Zac Brown wrote:
>
> +    if (dwFlags & WINHTTP_FLAG_ESCAPE_PERCENT ||
> +        dwFlags & WINHTTP_FLAG_NULL_CODEPAGE ||
> +        dwFlags & WINHTTP_FLAG_ESCAPE_DISABLE ||
> +        dwFlags & WINHTTP_FLAG_ESCAPE_DISABLE_QUERY)

    if (dwFlags & (WINHTTP_FLAG_ESCAPE_PERCENT
                   | WINHTTP_FLAG_NULL_CODEPAGE
                   | WINHTTP_FLAG_ESCAPE_DISABLE
                   | WINHTTP_FLAG_ESCAPE_DISABLE_QUERY))

is shorter and more efficient since it boils down to one "test"
instruction (at least it should), rather than a bunch of branching
required by short-circuiting.


Reply via email to