Henri Verbeet : usp10: Simplify the "sr_2" assignments in GSUB_apply_ContextSubst().

Alexandre Julliard julliard at winehq.org
Fri Apr 21 15:18:16 CDT 2017


Module: wine
Branch: master
Commit: ebe75cb66ca910608cc58fbef4096cb9719f02d3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ebe75cb66ca910608cc58fbef4096cb9719f02d3

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Apr 21 00:57:13 2017 +0200

usp10: Simplify the "sr_2" assignments in GSUB_apply_ContextSubst().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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-cvs mailing list