Fix uses of g_assert() around statements with side effects. (#115498,
Thu Jul 24 17:04:21 2003 Owen Taylor <otaylor@redhat.com> * 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)
This commit is contained in:
parent
f91deef2c9
commit
07bad0e77c
|
@ -156,6 +156,7 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset,
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int last_cluster;
|
int last_cluster;
|
||||||
|
int result;
|
||||||
|
|
||||||
TTO_GSUB gsub = NULL;
|
TTO_GSUB gsub = NULL;
|
||||||
TTO_GPOS gpos = NULL;
|
TTO_GPOS gpos = NULL;
|
||||||
|
@ -214,9 +215,11 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset,
|
||||||
if (!gsub && !gpos)
|
if (!gsub && !gpos)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_assert (TT_GSUB_String_New (ruleset->info->face->memory,
|
result = TT_GSUB_String_New (ruleset->info->face->memory, &in_string);
|
||||||
&in_string) == FT_Err_Ok);
|
g_assert (result == FT_Err_Ok);
|
||||||
g_assert (TT_GSUB_String_Set_Length (in_string, glyphs->num_glyphs) == 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++)
|
for (i = 0; i < glyphs->num_glyphs; i++)
|
||||||
{
|
{
|
||||||
|
@ -228,8 +231,9 @@ pango_ot_ruleset_shape (PangoOTRuleset *ruleset,
|
||||||
|
|
||||||
if (gsub)
|
if (gsub)
|
||||||
{
|
{
|
||||||
g_assert (TT_GSUB_String_New (ruleset->info->face->memory,
|
result = TT_GSUB_String_New (ruleset->info->face->memory,
|
||||||
&out_string) == FT_Err_Ok);
|
&out_string);
|
||||||
|
g_assert (result == FT_Err_Ok);
|
||||||
result_string = out_string;
|
result_string = out_string;
|
||||||
|
|
||||||
TT_GSUB_Apply_String (gsub, in_string, out_string);
|
TT_GSUB_Apply_String (gsub, in_string, out_string);
|
||||||
|
|
Loading…
Reference in New Issue