From 01afc442c73661df677c2b93f4037a21992ee45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 21 Feb 2020 18:28:45 +0100 Subject: Signals: Port connect calls to use callable_mp Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.) --- scene/3d/path.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scene/3d/path.cpp') diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp index 0cdcbd9a1f..f93485d79f 100644 --- a/scene/3d/path.cpp +++ b/scene/3d/path.cpp @@ -59,13 +59,13 @@ void Path::_curve_changed() { void Path::set_curve(const Ref &p_curve) { if (curve.is_valid()) { - curve->disconnect_compat("changed", this, "_curve_changed"); + curve->disconnect("changed", callable_mp(this, &Path::_curve_changed)); } curve = p_curve; if (curve.is_valid()) { - curve->connect_compat("changed", this, "_curve_changed"); + curve->connect("changed", callable_mp(this, &Path::_curve_changed)); } _curve_changed(); } @@ -79,7 +79,6 @@ void Path::_bind_methods() { ClassDB::bind_method(D_METHOD("set_curve", "curve"), &Path::set_curve); ClassDB::bind_method(D_METHOD("get_curve"), &Path::get_curve); - ClassDB::bind_method(D_METHOD("_curve_changed"), &Path::_curve_changed); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve3D"), "set_curve", "get_curve"); -- cgit v1.2.3