From 07bad0e77c42b5f2535e3b018bf9074d2f4ecc7c Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 24 Jul 2003 21:05:29 +0000 Subject: [PATCH] Fix uses of g_assert() around statements with side effects. (#115498, Thu Jul 24 17:04:21 2003 Owen Taylor * pango/opentype/pango-ot-ruleset.c (pango_ot_ruleset_shape): Fix uses of g_assert() around statements with side effects. (#115498, patch from David Cuthbert) --- src/pango-ot-ruleset.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pango-ot-ruleset.c b/src/pango-ot-ruleset.c index 1fdf734c7..756d0214c 100644 --- a/src/pango-ot-ruleset.c +++ b/src/pango-ot-ruleset.c @@ -156,6 +156,7 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset, { int i; int last_cluster; + int result; TTO_GSUB gsub = NULL; TTO_GPOS gpos = NULL; @@ -214,9 +215,11 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset, if (!gsub && !gpos) return; - g_assert (TT_GSUB_String_New (ruleset->info->face->memory, - &in_string) == FT_Err_Ok); - g_assert (TT_GSUB_String_Set_Length (in_string, glyphs->num_glyphs) == FT_Err_Ok); + result = TT_GSUB_String_New (ruleset->info->face->memory, &in_string); + g_assert (result == FT_Err_Ok); + + result = TT_GSUB_String_Set_Length (in_string, glyphs->num_glyphs); + g_assert (result == FT_Err_Ok); for (i = 0; i < glyphs->num_glyphs; i++) { @@ -228,8 +231,9 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset, if (gsub) { - g_assert (TT_GSUB_String_New (ruleset->info->face->memory, - &out_string) == FT_Err_Ok); + result = TT_GSUB_String_New (ruleset->info->face->memory, + &out_string); + g_assert (result == FT_Err_Ok); result_string = out_string; TT_GSUB_Apply_String (gsub, in_string, out_string);