Skip to content

Commit 092c2ab

Browse files
committed
add missing shape case
1 parent 6043c35 commit 092c2ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/zbullet.zig

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,7 @@ const ShapeImpl = opaque {
303303

304304
pub fn destroy(shape: Shape) void {
305305
switch (shape.getType()) {
306-
.box,
307-
.sphere,
308-
.capsule,
309-
.cylinder,
310-
.compound,
311-
.convex_hull
312-
=> cbtShapeDestroy(shape),
306+
.box, .sphere, .capsule, .cylinder, .compound, .convex_hull => cbtShapeDestroy(shape),
313307
.trimesh => cbtShapeTriMeshDestroy(shape),
314308
}
315309
}
@@ -372,6 +366,7 @@ const ShapeImpl = opaque {
372366
.capsule => CapsuleShape,
373367
.compound => CompoundShape,
374368
.trimesh => TriangleMeshShape,
369+
.convex_hull => ConvexHullShape,
375370
} {
376371
std.debug.assert(shape.getType() == stype);
377372
return switch (stype) {
@@ -381,6 +376,7 @@ const ShapeImpl = opaque {
381376
.capsule => @as(CapsuleShape, @ptrCast(shape)),
382377
.compound => @as(CompoundShape, @ptrCast(shape)),
383378
.trimesh => @as(TriangleMeshShape, @ptrCast(shape)),
379+
.convex_hull => @as(ConvexHullShape, @ptrCast(shape)),
384380
};
385381
}
386382
};

0 commit comments

Comments
 (0)