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.
This commit is contained in:
Rémi Verschelde 2024-02-28 22:36:49 +01:00
parent df78c0636d
commit 6fdf3e5d22
No known key found for this signature in database
GPG Key ID: C3336907360768E1
8 changed files with 7 additions and 24 deletions

View File

@ -625,5 +625,3 @@ bool NavigationMesh::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
#endif // DISABLE_DEPRECATED
NavigationMesh::NavigationMesh() {}

View File

@ -199,7 +199,8 @@ public:
Ref<ArrayMesh> get_debug_mesh();
#endif // DEBUG_ENABLED
NavigationMesh();
NavigationMesh() {}
~NavigationMesh() {}
};
VARIANT_ENUM_CAST(NavigationMesh::SamplePartitionType);

View File

@ -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();
}

View File

@ -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

View File

@ -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();
}

View File

@ -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

View File

@ -541,5 +541,3 @@ void NavigationPolygon::_validate_property(PropertyInfo &p_property) const {
}
}
}
NavigationPolygon::NavigationPolygon() {}

View File

@ -153,7 +153,7 @@ public:
void clear();
NavigationPolygon();
NavigationPolygon() {}
~NavigationPolygon() {}
};