From fc727fef91eb276d8b9a1cf8ed8f5934ae209f59 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Fri, 24 Apr 2020 18:07:28 +0200 Subject: [Theme] Don't print unneeded (). --- source/theme.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/source/theme.c b/source/theme.c index fd9aa8ec..1a7fe863 100644 --- a/source/theme.c +++ b/source/theme.c @@ -277,7 +277,7 @@ inline static void printf_double ( double d ) static void rofi_theme_print_distance_unit ( RofiDistanceUnit *unit ) { - if ( unit->modtype != ROFI_DISTANCE_MODIFIER_NONE ) + if ( unit->modtype == ROFI_DISTANCE_MODIFIER_GROUP ) fputs("( " , stdout); if ( unit->left ) rofi_theme_print_distance_unit ( unit->left ); @@ -312,7 +312,7 @@ static void rofi_theme_print_distance_unit ( RofiDistanceUnit *unit ) fputs ( "em ", stdout ); } } - if ( unit->modtype != ROFI_DISTANCE_MODIFIER_NONE ) + if ( unit->modtype == ROFI_DISTANCE_MODIFIER_GROUP ) fputs(" )" , stdout); } @@ -975,15 +975,7 @@ static int distance_unit_get_pixel ( RofiDistanceUnit *unit, RofiOrientation ori int distance_get_pixel ( RofiDistance d, RofiOrientation ori ) { - if ( d.base.modtype == ROFI_DISTANCE_MODIFIER_GROUP ){ - rofi_theme_print_distance_unit ( &(d.base) ); - printf("\n"); - } - int val = distance_unit_get_pixel ( &(d.base), ori); - if ( d.base.modtype == ROFI_DISTANCE_MODIFIER_GROUP ){ - printf("val: %d\r\n", val); - } - return val; + return distance_unit_get_pixel ( &(d.base), ori); } void distance_get_linestyle ( RofiDistance d, cairo_t *draw ) -- cgit v1.2.3