diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-04 09:25:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 09:25:07 +0200 |
commit | bdf898e38d8f7d87496a4ba30a2c2da2f6771988 (patch) | |
tree | 878f80e9a6c3bfd0c944887259afc1884b0cc976 /scene/resources | |
parent | 171be91804d68adf7d36e36a3f15e885cda47bf7 (diff) | |
parent | a0f206aae81b44fb48cb74900b9831835da40327 (diff) |
Merge pull request #22707 from karroffel/clang-warnings
fix enum cast warnings on clang
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/animation.cpp | 2 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 80ad2ad739..5c01cadcd5 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1901,7 +1901,7 @@ void Animation::value_track_set_update_mode(int p_track, UpdateMode p_mode) { ERR_FAIL_INDEX(p_track, tracks.size()); Track *t = tracks[p_track]; ERR_FAIL_COND(t->type != TYPE_VALUE); - ERR_FAIL_INDEX(p_mode, 4); + ERR_FAIL_INDEX((int)p_mode, 4); ValueTrack *vt = static_cast<ValueTrack *>(t); vt->update_mode = p_mode; diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index fb81375b0a..69d85eeef3 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -136,7 +136,7 @@ Ref<Texture> StyleBoxTexture::get_normal_map() const { void StyleBoxTexture::set_margin_size(Margin p_margin, float p_size) { - ERR_FAIL_INDEX(p_margin, 4); + ERR_FAIL_INDEX((int)p_margin, 4); margin[p_margin] = p_size; emit_changed(); @@ -200,7 +200,7 @@ Size2 StyleBoxTexture::get_center_size() const { void StyleBoxTexture::set_expand_margin_size(Margin p_expand_margin, float p_size) { - ERR_FAIL_INDEX(p_expand_margin, 4); + ERR_FAIL_INDEX((int)p_expand_margin, 4); expand_margin[p_expand_margin] = p_size; emit_changed(); } @@ -223,7 +223,7 @@ void StyleBoxTexture::set_expand_margin_size_all(float p_expand_margin_size) { float StyleBoxTexture::get_expand_margin_size(Margin p_expand_margin) const { - ERR_FAIL_INDEX_V(p_expand_margin, 4, 0); + ERR_FAIL_INDEX_V((int)p_expand_margin, 4, 0); return expand_margin[p_expand_margin]; } |