[PATCH 4/5] usp10: Simplify the "sr_2" assignments in GSUB_apply_ContextSubst().
Aric Stewart
aric at codeweavers.com
Fri Apr 21 06:47:20 CDT 2017
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 4/20/17 5:57 PM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
> dlls/usp10/opentype.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
> index f01839b..307b6a9 100644
> --- a/dlls/usp10/opentype.c
> +++ b/dlls/usp10/opentype.c
> @@ -1121,8 +1121,7 @@ static INT GSUB_apply_ContextSubst(const OT_LookupList* lookup, const OT_LookupT
> }
>
> TRACE(" Rule matches\n");
> - sr_2 = (const GSUB_SubRule_2*)((const BYTE*)sr+
> - FIELD_OFFSET(GSUB_SubRule_1, Input[g_count-1]));
> + sr_2 = (const GSUB_SubRule_2 *)&sr->Input[g_count - 1];
>
> for (l = 0; l < GET_BE_WORD(sr->SubstCount); l++)
> {
> @@ -1201,8 +1200,7 @@ static INT GSUB_apply_ContextSubst(const OT_LookupList* lookup, const OT_LookupT
> }
>
> TRACE(" Rule matches\n");
> - sr_2 = (const GSUB_SubClassRule_2*)((const BYTE*)sr+
> - FIELD_OFFSET(GSUB_SubClassRule_1, Class[g_count-1]));
> + sr_2 = (const GSUB_SubClassRule_2 *)&sr->Class[g_count - 1];
>
> for (l = 0; l < GET_BE_WORD(sr->SubstCount); l++)
> {
>
More information about the wine-patches
mailing list