summaryrefslogtreecommitdiff
path: root/pango/pango-gravity.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-02 01:15:28 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-02 01:24:01 -0400
commitc0697a15fb7c738ab0ff78dc4abedff896497749 (patch)
tree5e3c9b779a431cd54578afe4c5e0fee48b3f3309 /pango/pango-gravity.c
parentfc9057e3a5b73dffb7761d00a9324ea8903a26bf (diff)
downloadpango-c0697a15fb7c738ab0ff78dc4abedff896497749.tar.gz
gravity: Remove redundant code
Just pass PANGO_GRAVITY_AUTO on to pango_gravity_get_for_script_and_width. It has just the same fallback handling.
Diffstat (limited to 'pango/pango-gravity.c')
-rw-r--r--pango/pango-gravity.c18
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;