summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-28 22:36:49 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-28 22:41:44 +0100
commit6fdf3e5d22260bd20f1e3790b06780246cd753b0 (patch)
treef16d202856c58503d0fffaafc1219c436c7196c6
parentdf78c0636d79c9545a283e0e2a926d623998cc27 (diff)
downloadredot-engine-6fdf3e5d22260bd20f1e3790b06780246cd753b0.tar.gz
Fix linking NavigationServer2D/3D with all classes disabled in build profile
For some reason the destructor for NavigationMeshSourceGeometryData2D/3D being implemented in the .cpp was causing linking issues.
-rw-r--r--scene/resources/navigation_mesh.cpp2
-rw-r--r--scene/resources/navigation_mesh.h3
-rw-r--r--scene/resources/navigation_mesh_source_geometry_data_2d.cpp7
-rw-r--r--scene/resources/navigation_mesh_source_geometry_data_2d.h4
-rw-r--r--scene/resources/navigation_mesh_source_geometry_data_3d.cpp7
-rw-r--r--scene/resources/navigation_mesh_source_geometry_data_3d.h4
-rw-r--r--scene/resources/navigation_polygon.cpp2
-rw-r--r--scene/resources/navigation_polygon.h2
8 files changed, 7 insertions, 24 deletions
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index a7ce15c5ad..7a7bab636b 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -625,5 +625,3 @@ bool NavigationMesh::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
#endif // DISABLE_DEPRECATED
-
-NavigationMesh::NavigationMesh() {}
diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h
index 1daebdda7f..136e1cf468 100644
--- a/scene/resources/navigation_mesh.h
+++ b/scene/resources/navigation_mesh.h
@@ -199,7 +199,8 @@ public:
Ref<ArrayMesh> get_debug_mesh();
#endif // DEBUG_ENABLED
- NavigationMesh();
+ NavigationMesh() {}
+ ~NavigationMesh() {}
};
VARIANT_ENUM_CAST(NavigationMesh::SamplePartitionType);
diff --git a/scene/resources/navigation_mesh_source_geometry_data_2d.cpp b/scene/resources/navigation_mesh_source_geometry_data_2d.cpp
index 3dde6dbff6..fabe1659c6 100644
--- a/scene/resources/navigation_mesh_source_geometry_data_2d.cpp
+++ b/scene/resources/navigation_mesh_source_geometry_data_2d.cpp
@@ -129,10 +129,3 @@ void NavigationMeshSourceGeometryData2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "traversable_outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "set_traversable_outlines", "get_traversable_outlines");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "obstruction_outlines", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "set_obstruction_outlines", "get_obstruction_outlines");
}
-
-NavigationMeshSourceGeometryData2D::NavigationMeshSourceGeometryData2D() {
-}
-
-NavigationMeshSourceGeometryData2D::~NavigationMeshSourceGeometryData2D() {
- clear();
-}
diff --git a/scene/resources/navigation_mesh_source_geometry_data_2d.h b/scene/resources/navigation_mesh_source_geometry_data_2d.h
index f26a4e9a2e..985f90fb9e 100644
--- a/scene/resources/navigation_mesh_source_geometry_data_2d.h
+++ b/scene/resources/navigation_mesh_source_geometry_data_2d.h
@@ -71,8 +71,8 @@ public:
bool has_data() { return traversable_outlines.size(); };
void clear();
- NavigationMeshSourceGeometryData2D();
- ~NavigationMeshSourceGeometryData2D();
+ NavigationMeshSourceGeometryData2D() {}
+ ~NavigationMeshSourceGeometryData2D() { clear(); }
};
#endif // NAVIGATION_MESH_SOURCE_GEOMETRY_DATA_2D_H
diff --git a/scene/resources/navigation_mesh_source_geometry_data_3d.cpp b/scene/resources/navigation_mesh_source_geometry_data_3d.cpp
index 412455be73..e39ffab47a 100644
--- a/scene/resources/navigation_mesh_source_geometry_data_3d.cpp
+++ b/scene/resources/navigation_mesh_source_geometry_data_3d.cpp
@@ -182,10 +182,3 @@ void NavigationMeshSourceGeometryData3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "set_vertices", "get_vertices");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "indices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "set_indices", "get_indices");
}
-
-NavigationMeshSourceGeometryData3D::NavigationMeshSourceGeometryData3D() {
-}
-
-NavigationMeshSourceGeometryData3D::~NavigationMeshSourceGeometryData3D() {
- clear();
-}
diff --git a/scene/resources/navigation_mesh_source_geometry_data_3d.h b/scene/resources/navigation_mesh_source_geometry_data_3d.h
index ec8bddd4dd..10048773fe 100644
--- a/scene/resources/navigation_mesh_source_geometry_data_3d.h
+++ b/scene/resources/navigation_mesh_source_geometry_data_3d.h
@@ -68,8 +68,8 @@ public:
void add_mesh_array(const Array &p_mesh_array, const Transform3D &p_xform);
void add_faces(const PackedVector3Array &p_faces, const Transform3D &p_xform);
- NavigationMeshSourceGeometryData3D();
- ~NavigationMeshSourceGeometryData3D();
+ NavigationMeshSourceGeometryData3D() {}
+ ~NavigationMeshSourceGeometryData3D() { clear(); }
};
#endif // NAVIGATION_MESH_SOURCE_GEOMETRY_DATA_3D_H
diff --git a/scene/resources/navigation_polygon.cpp b/scene/resources/navigation_polygon.cpp
index 150e4b924f..e830153330 100644
--- a/scene/resources/navigation_polygon.cpp
+++ b/scene/resources/navigation_polygon.cpp
@@ -541,5 +541,3 @@ void NavigationPolygon::_validate_property(PropertyInfo &p_property) const {
}
}
}
-
-NavigationPolygon::NavigationPolygon() {}
diff --git a/scene/resources/navigation_polygon.h b/scene/resources/navigation_polygon.h
index f20d510b93..b9816f900c 100644
--- a/scene/resources/navigation_polygon.h
+++ b/scene/resources/navigation_polygon.h
@@ -153,7 +153,7 @@ public:
void clear();
- NavigationPolygon();
+ NavigationPolygon() {}
~NavigationPolygon() {}
};