diff options
author | Timm Bäder <mail@baedert.org> | 2022-01-02 09:46:28 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2022-01-07 17:21:37 +0100 |
commit | b4089672780abd40719ae172fdd02eec229be81a (patch) | |
tree | 160c675b7e3f30f9b69a38eabab956dfcd3cf9c7 | |
parent | fef179b625689dd781f5ef9160854c1a76fa189b (diff) | |
download | gtk+-b4089672780abd40719ae172fdd02eec229be81a.tar.gz |
label: Remove a redundant assignment
clang-tidy says:
gtklabel.c:1188:15: warning: Although the value stored to 'mid' is used in the enclosing expression, the value is never actually read from 'mid'
min = mid = text_width;
^ ~~~~~~~~~~
Which seems right since mid will be assigned to at the beginning of the
next loop iteration anyway.
-rw-r--r-- | gtk/gtklabel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 10ee98f5a8..5def4168b6 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1186,7 +1186,7 @@ my_pango_layout_get_width_for_height (PangoLayout *layout, pango_layout_get_size (layout, &text_width, &text_height); text_width = PANGO_PIXELS_CEIL (text_width); if (text_width > mid) - min = mid = text_width; + min = text_width; else if (text_height > for_height) min = mid + 1; else |