diff options
| author | Rémi Verschelde | 2017-08-25 08:37:38 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-25 08:37:38 +0200 |
| commit | 490aef93699abc00da58f73b1596fb3473fd53c6 (patch) | |
| tree | 7912c7a540eca6b09392bbd2aa2f30fefe37f51a /scene/resources/theme.cpp | |
| parent | b1c0e45b03aa14453846c9a888763077eef2476b (diff) | |
| parent | cacced7e507f7603bacc03ae2616e58f0ede122a (diff) | |
| download | godot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.gz godot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.zst godot-490aef93699abc00da58f73b1596fb3473fd53c6.zip | |
Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
Diffstat (limited to 'scene/resources/theme.cpp')
| -rw-r--r-- | scene/resources/theme.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index ac1bb105a..c2c7c3776 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -1030,14 +1030,13 @@ RES ResourceFormatLoaderTheme::load(const String &p_path, const String &p_origin ERR_FAIL_V(RES()); } - if (res->cast_to<StyleBox>()) { - + if (Object::cast_to<StyleBox>(*res)) { theme->set_stylebox(item, control, res); - } else if (res->cast_to<Font>()) { + } else if (Object::cast_to<Font>(*res)) { theme->set_font(item, control, res); - } else if (res->cast_to<Font>()) { + } else if (Object::cast_to<Font>(*res)) { theme->set_font(item, control, res); - } else if (res->cast_to<Texture>()) { + } else if (Object::cast_to<Texture>(*res)) { theme->set_icon(item, control, res); } else { memdelete(f); |
