Skip to content

Commit 1996547

Browse files
authored
Fix various cases of incorrect types for color arguments. (#5)
These are not pointers, but value types.
1 parent 194bf41 commit 1996547

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/zphysics.zig

+6-6
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ pub const DebugRenderer = if (!debug_renderer_enabled) extern struct {} else ext
12861286

12871287
pub fn Methods(comptime T: type) type {
12881288
return extern struct {
1289-
pub inline fn drawLine(self: *T, from: *const [3]Real, to: *const [3]Real, color: *const Color) void {
1289+
pub inline fn drawLine(self: *T, from: *const [3]Real, to: *const [3]Real, color: Color) void {
12901290
return @as(*const DebugRenderer.VTable(T), @ptrCast(self.__v))
12911291
.drawLine(
12921292
@as(*const T, @ptrCast(self)),
@@ -1300,7 +1300,7 @@ pub const DebugRenderer = if (!debug_renderer_enabled) extern struct {} else ext
13001300
v1: *const [3]Real,
13011301
v2: *const [3]Real,
13021302
v3: *const [3]Real,
1303-
color: *const Color,
1303+
color: Color,
13041304
) void {
13051305
return @as(*const DebugRenderer.VTable(T), @ptrCast(self.__v))
13061306
.drawTriangle(
@@ -1388,14 +1388,14 @@ pub const DebugRenderer = if (!debug_renderer_enabled) extern struct {} else ext
13881388
self: *T,
13891389
from: *const [3]Real,
13901390
to: *const [3]Real,
1391-
color: *const Color,
1391+
color: Color,
13921392
) callconv(.C) void = null,
13931393
drawTriangle: ?*const fn (
13941394
self: *T,
13951395
v1: *const [3]Real,
13961396
v2: *const [3]Real,
13971397
v3: *const [3]Real,
1398-
color: *const Color,
1398+
color: Color,
13991399
) callconv(.C) void = null,
14001400
createTriangleBatch: ?*const fn (
14011401
self: *T,
@@ -4999,7 +4999,7 @@ const test_cb1 = struct {
49994999
self: *MyDebugRenderer,
50005000
from: *const [3]Real,
50015001
to: *const [3]Real,
5002-
color: *const DebugRenderer.Color,
5002+
color: DebugRenderer.Color,
50035003
) callconv(.C) void {
50045004
_ = self;
50055005
_ = from;
@@ -5011,7 +5011,7 @@ const test_cb1 = struct {
50115011
v1: *const [3]Real,
50125012
v2: *const [3]Real,
50135013
v3: *const [3]Real,
5014-
color: *const DebugRenderer.Color,
5014+
color: DebugRenderer.Color,
50155015
) callconv(.C) void {
50165016
_ = self;
50175017
_ = v1;

0 commit comments

Comments
 (0)