diff options
author | karroffel <therzog@mail.de> | 2018-10-04 09:17:59 +0200 |
---|---|---|
committer | karroffel <therzog@mail.de> | 2018-10-04 09:17:59 +0200 |
commit | a0f206aae81b44fb48cb74900b9831835da40327 (patch) | |
tree | 878f80e9a6c3bfd0c944887259afc1884b0cc976 /scene/gui | |
parent | 171be91804d68adf7d36e36a3f15e885cda47bf7 (diff) |
fix enum cast warnings on clang
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/control.cpp | 4 | ||||
-rw-r--r-- | scene/gui/label.cpp | 4 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/nine_patch_rect.cpp | 4 | ||||
-rw-r--r-- | scene/gui/texture_progress.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index dc18895298..b90a4c17f4 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2235,13 +2235,13 @@ String Control::_get_tooltip() const { void Control::set_focus_neighbour(Margin p_margin, const NodePath &p_neighbour) { - ERR_FAIL_INDEX(p_margin, 4); + ERR_FAIL_INDEX((int)p_margin, 4); data.focus_neighbour[p_margin] = p_neighbour; } NodePath Control::get_focus_neighbour(Margin p_margin) const { - ERR_FAIL_INDEX_V(p_margin, 4, NodePath()); + ERR_FAIL_INDEX_V((int)p_margin, 4, NodePath()); return data.focus_neighbour[p_margin]; } diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 91dab27930..6ff2d232f0 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -511,7 +511,7 @@ void Label::regenerate_word_cache() { void Label::set_align(Align p_align) { - ERR_FAIL_INDEX(p_align, 4); + ERR_FAIL_INDEX((int)p_align, 4); align = p_align; update(); } @@ -523,7 +523,7 @@ Label::Align Label::get_align() const { void Label::set_valign(VAlign p_align) { - ERR_FAIL_INDEX(p_align, 4); + ERR_FAIL_INDEX((int)p_align, 4); valign = p_align; update(); } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 9c43d5b308..6f344f1028 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -527,7 +527,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { void LineEdit::set_align(Align p_align) { - ERR_FAIL_INDEX(p_align, 4); + ERR_FAIL_INDEX((int)p_align, 4); align = p_align; update(); } diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp index b8f6ffe6d2..c6a34921c7 100644 --- a/scene/gui/nine_patch_rect.cpp +++ b/scene/gui/nine_patch_rect.cpp @@ -110,7 +110,7 @@ Ref<Texture> NinePatchRect::get_texture() const { void NinePatchRect::set_patch_margin(Margin p_margin, int p_size) { - ERR_FAIL_INDEX(p_margin, 4); + ERR_FAIL_INDEX((int)p_margin, 4); margin[p_margin] = p_size; update(); minimum_size_changed(); @@ -132,7 +132,7 @@ void NinePatchRect::set_patch_margin(Margin p_margin, int p_size) { int NinePatchRect::get_patch_margin(Margin p_margin) const { - ERR_FAIL_INDEX_V(p_margin, 4, 0); + ERR_FAIL_INDEX_V((int)p_margin, 4, 0); return margin[p_margin]; } diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index d28b4065fb..7ecdccb0e4 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -59,14 +59,14 @@ Ref<Texture> TextureProgress::get_over_texture() const { } void TextureProgress::set_stretch_margin(Margin p_margin, int p_size) { - ERR_FAIL_INDEX(p_margin, 4); + ERR_FAIL_INDEX((int)p_margin, 4); stretch_margin[p_margin] = p_size; update(); minimum_size_changed(); } int TextureProgress::get_stretch_margin(Margin p_margin) const { - ERR_FAIL_INDEX_V(p_margin, 4, 0); + ERR_FAIL_INDEX_V((int)p_margin, 4, 0); return stretch_margin[p_margin]; } |