[gnome-shell] st/scroll-bar: Remove pointless condition



commit f719ea8d69962afd0cfe54ddf65010780044ad30
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Aug 13 04:06:24 2021 +0200

    st/scroll-bar: Remove pointless condition
    
    Both branches are identical (which is correct - orientation or
    text direction is irrelevant for the trough).
    
    Spotted by coverity in CID 351261.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>

 src/st/st-scroll-bar.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c
index d4aa1762d3..f7188e8247 100644
--- a/src/st/st-scroll-bar.c
+++ b/src/st/st-scroll-bar.c
@@ -200,23 +200,11 @@ scroll_bar_allocate_children (StScrollBar           *bar,
 
   st_theme_node_get_content_box (theme_node, box, &content_box);
 
-  if (priv->vertical)
-    {
-      trough_box.x1 = content_box.x1;
-      trough_box.y1 = content_box.y1;
-      trough_box.x2 = content_box.x2;
-      trough_box.y2 = content_box.y2;
-      clutter_actor_allocate (priv->trough, &trough_box);
-    }
-  else
-    {
-      trough_box.x1 = content_box.x1;
-      trough_box.y1 = content_box.y1;
-      trough_box.x2 = content_box.x2;
-      trough_box.y2 = content_box.y2;
-      clutter_actor_allocate (priv->trough, &trough_box);
-    }
-
+  trough_box.x1 = content_box.x1;
+  trough_box.y1 = content_box.y1;
+  trough_box.x2 = content_box.x2;
+  trough_box.y2 = content_box.y2;
+  clutter_actor_allocate (priv->trough, &trough_box);
 
   if (priv->adjustment)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]