diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-02 05:49:23 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-02 05:49:23 +0000 |
commit | e2c1cdbec788875fe02d63d801ba022ee6d75db5 (patch) | |
tree | 17b032d705eeeb5ae527d91d0eda4d2bdf523356 /pango/pango-gravity.c | |
parent | fc9057e3a5b73dffb7761d00a9324ea8903a26bf (diff) | |
parent | 91687742f61d4b74572f3176fa3d8442438df504 (diff) | |
download | pango-e2c1cdbec788875fe02d63d801ba022ee6d75db5.tar.gz |
Merge branch 'gravity-fix' into 'main'
gravity: Remove redundant code
See merge request GNOME/pango!384
Diffstat (limited to 'pango/pango-gravity.c')
-rw-r--r-- | pango/pango-gravity.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pango/pango-gravity.c b/pango/pango-gravity.c index 30e99eb0..0eb3cfe2 100644 --- a/pango/pango-gravity.c +++ b/pango/pango-gravity.c @@ -362,16 +362,13 @@ get_script_properties (PangoScript script) */ PangoGravity pango_gravity_get_for_script (PangoScript script, - PangoGravity base_gravity, - PangoGravityHint hint) + PangoGravity base_gravity, + PangoGravityHint hint) { PangoScriptProperties props = get_script_properties (script); - if (G_UNLIKELY (base_gravity == PANGO_GRAVITY_AUTO)) - base_gravity = props.preferred_gravity; - return pango_gravity_get_for_script_and_width (script, props.wide, - base_gravity, hint); + base_gravity, hint); } /** @@ -403,15 +400,14 @@ pango_gravity_get_for_script (PangoScript script, * Since: 1.26 */ PangoGravity -pango_gravity_get_for_script_and_width (PangoScript script, - gboolean wide, - PangoGravity base_gravity, - PangoGravityHint hint) +pango_gravity_get_for_script_and_width (PangoScript script, + gboolean wide, + PangoGravity base_gravity, + PangoGravityHint hint) { PangoScriptProperties props = get_script_properties (script); gboolean vertical; - if (G_UNLIKELY (base_gravity == PANGO_GRAVITY_AUTO)) base_gravity = props.preferred_gravity; |