[PATCH 4/5] usp10: Make the script cache parameter to get_opentype_script() const.

Aric Stewart aric at codeweavers.com
Mon Mar 20 07:09:50 CDT 2017


Signed-off-by: Aric Stewart <aric at codeweavers.com>

On 3/19/17 4:59 PM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
>  dlls/usp10/shape.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
> index c37e0a0..f39c7ea 100644
> --- a/dlls/usp10/shape.c
> +++ b/dlls/usp10/shape.c
> @@ -565,19 +565,21 @@ static INT GSUB_apply_feature_all_lookups(LPCVOID header, LoadedFeature *feature
>      return out_index;
>  }
>  
> -static OPENTYPE_TAG get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, BOOL tryNew)
> +static OPENTYPE_TAG get_opentype_script(HDC hdc, const SCRIPT_ANALYSIS *psa,
> +        const ScriptCache *script_cache, BOOL try_new)
>  {
>      UINT charset;
>  
> -    if (psc->userScript != 0)
> +    if (script_cache->userScript)
>      {
> -        if (tryNew && ShapingData[psa->eScript].newOtTag != 0 && psc->userScript == scriptInformation[psa->eScript].scriptTag)
> +        if (try_new && ShapingData[psa->eScript].newOtTag
> +                && script_cache->userScript == scriptInformation[psa->eScript].scriptTag)
>              return ShapingData[psa->eScript].newOtTag;
> -        else
> -            return psc->userScript;
> +
> +        return script_cache->userScript;
>      }
>  
> -    if (tryNew && ShapingData[psa->eScript].newOtTag != 0)
> +    if (try_new && ShapingData[psa->eScript].newOtTag)
>          return ShapingData[psa->eScript].newOtTag;
>  
>      if (scriptInformation[psa->eScript].scriptTag)
> 



More information about the wine-patches mailing list