diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-27 16:48:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-27 16:48:09 +0200 |
| commit | 4cf5bb027678717263476e676cd23f881eef1ca1 (patch) | |
| tree | a842d54e82a4998c8b593f86fef858560c10b4d2 /scene/gui/rich_text_label.cpp | |
| parent | cb5a62903f9798da8b12f625cbd5a493f14e41d3 (diff) | |
| parent | cdc411fd54fbafc414b29abb1d50a0ff327f0d89 (diff) | |
| download | redot-engine-4cf5bb027678717263476e676cd23f881eef1ca1.tar.gz | |
Merge pull request #22446 from akien-mga/fix-warnings
Fix various warnings raised by GCC 5
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
| -rw-r--r-- | scene/gui/rich_text_label.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 81f1ee67c5..bb36852cf9 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -421,7 +421,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & int cw = 0; - bool visible = visible_characters < 0 || p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - line_descent - line_ascent, line_ascent + line_descent); + bool visible = visible_characters < 0 || (p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - line_descent - line_ascent, line_ascent + line_descent)); if (visible) line_is_blank = false; @@ -509,7 +509,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & ENSURE_WIDTH(img->image->get_width()); - bool visible = visible_characters < 0 || p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - font->get_descent() - img->image->get_height(), img->image->get_height()); + bool visible = visible_characters < 0 || (p_char_count < visible_characters && YRANGE_VISIBLE(y + lh - font->get_descent() - img->image->get_height(), img->image->get_height())); if (visible) line_is_blank = false; @@ -847,8 +847,6 @@ void RichTextLabel::_notification(int p_what) { bool use_outline = get_constant("shadow_as_outline"); Point2 shadow_ofs(get_constant("shadow_offset_x"), get_constant("shadow_offset_y")); - float x_ofs = 0; - visible_line_count = 0; while (y < size.height && from_line < main->lines.size()) { @@ -866,7 +864,6 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item if (r_click_item) *r_click_item = NULL; - Size2 size = get_size(); Rect2 text_rect = _get_text_rect(); int ofs = vscroll->get_value(); Color font_color_shadow = get_color("font_color_shadow"); |
