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 /editor/editor_path.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 '')
| -rw-r--r-- | editor/editor_path.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index fdac68ea1..24206b0f0 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -139,9 +139,9 @@ void EditorPath::_notification(int p_what) { if (left < 0) continue; String name; - if (obj->cast_to<Resource>()) { + if (Object::cast_to<Resource>(obj)) { - Resource *r = obj->cast_to<Resource>(); + Resource *r = Object::cast_to<Resource>(obj); if (r->get_path().is_resource_file()) name = r->get_path().get_file(); else @@ -149,11 +149,11 @@ void EditorPath::_notification(int p_what) { if (name == "") name = r->get_class(); - } else if (obj->cast_to<Node>()) { + } else if (Object::cast_to<Node>(obj)) { - name = obj->cast_to<Node>()->get_name(); - } else if (obj->cast_to<Resource>() && obj->cast_to<Resource>()->get_name() != "") { - name = obj->cast_to<Resource>()->get_name(); + name = Object::cast_to<Node>(obj)->get_name(); + } else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "") { + name = Object::cast_to<Resource>(obj)->get_name(); } else { name = obj->get_class(); } |
