summaryrefslogtreecommitdiff
path: root/scene/2d/path_2d.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-21 18:28:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-28 14:24:09 +0100
commit01afc442c73661df677c2b93f4037a21992ee45b (patch)
tree9a5b0b68cb022873ba31929fe6a785ddf5c0555c /scene/2d/path_2d.cpp
parenta439131c2b06b3d452e5be13530b6d2caa72c1aa (diff)
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.)
Diffstat (limited to 'scene/2d/path_2d.cpp')
-rw-r--r--scene/2d/path_2d.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 9ef3d0ca4f..3e807f12dc 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -134,13 +134,13 @@ void Path2D::_curve_changed() {
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {
if (curve.is_valid()) {
- curve->disconnect_compat("changed", this, "_curve_changed");
+ curve->disconnect("changed", callable_mp(this, &Path2D::_curve_changed));
}
curve = p_curve;
if (curve.is_valid()) {
- curve->connect_compat("changed", this, "_curve_changed");
+ curve->connect("changed", callable_mp(this, &Path2D::_curve_changed));
}
_curve_changed();
@@ -155,7 +155,6 @@ void Path2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_curve", "curve"), &Path2D::set_curve);
ClassDB::bind_method(D_METHOD("get_curve"), &Path2D::get_curve);
- ClassDB::bind_method(D_METHOD("_curve_changed"), &Path2D::_curve_changed);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve2D"), "set_curve", "get_curve");
}