diff --git a/glfw/src/GammaRamp.zig b/glfw/src/GammaRamp.zig index 1bd4888c..f13923d1 100644 --- a/glfw/src/GammaRamp.zig +++ b/glfw/src/GammaRamp.zig @@ -22,7 +22,7 @@ owned: bool, /// Initializes a new owned gamma ramp with the given array size and undefined values. /// /// see also: glfw.Monitor.getGammaRamp -pub inline fn init(allocator: *mem.Allocator, size: usize) !GammaRamp { +pub inline fn init(allocator: mem.Allocator, size: usize) !GammaRamp { const buf = try allocator.alloc(u16, size * 3); return GammaRamp{ .red = buf[size * 0 .. (size * 0) + size], @@ -59,7 +59,7 @@ pub inline fn toC(self: GammaRamp) c.GLFWgammaramp { } /// Deinitializes the memory using the allocator iff `.owned = true`. -pub inline fn deinit(self: GammaRamp, allocator: *mem.Allocator) void { +pub inline fn deinit(self: GammaRamp, allocator: mem.Allocator) void { if (self.owned) allocator.free(self.red); } diff --git a/glfw/src/Image.zig b/glfw/src/Image.zig index 07aacccf..d676ed6b 100644 --- a/glfw/src/Image.zig +++ b/glfw/src/Image.zig @@ -30,7 +30,7 @@ pixels: []u8, owned: bool, /// Initializes a new owned image with the given size and pixel_data_len of undefined .pixel values. -pub inline fn init(allocator: *mem.Allocator, width: usize, height: usize, pixel_data_len: usize) !Image { +pub inline fn init(allocator: mem.Allocator, width: usize, height: usize, pixel_data_len: usize) !Image { const buf = try allocator.alloc(u8, pixel_data_len); return Image{ .width = width, @@ -67,7 +67,7 @@ pub inline fn toC(self: Image) c.GLFWimage { } /// Deinitializes the memory using the allocator iff `.owned = true`. -pub inline fn deinit(self: Image, allocator: *mem.Allocator) void { +pub inline fn deinit(self: Image, allocator: mem.Allocator) void { if (self.owned) allocator.free(self.pixels); } diff --git a/glfw/src/Monitor.zig b/glfw/src/Monitor.zig index 9026c2ad..ee4200e5 100644 --- a/glfw/src/Monitor.zig +++ b/glfw/src/Monitor.zig @@ -215,7 +215,7 @@ pub inline fn getUserPointer(self: Monitor, comptime T: type) ?*T { /// @thread_safety This function must only be called from the main thread. /// /// see also: monitor_modes, glfw.Monitor.getVideoMode -pub inline fn getVideoModes(self: Monitor, allocator: *mem.Allocator) Error![]VideoMode { +pub inline fn getVideoModes(self: Monitor, allocator: mem.Allocator) Error![]VideoMode { internal_debug.assertInitialized(); var count: c_int = 0; const modes = c.glfwGetVideoModes(self.handle, &count); @@ -357,7 +357,7 @@ pub inline fn setGammaRamp(self: Monitor, ramp: GammaRamp) Error!void { /// @thread_safety This function must only be called from the main thread. /// /// see also: monitor_monitors, monitor_event, glfw.monitor.getPrimary -pub inline fn getAll(allocator: *mem.Allocator) mem.Allocator.Error![]Monitor { +pub inline fn getAll(allocator: mem.Allocator) mem.Allocator.Error![]Monitor { internal_debug.assertInitialized(); var count: c_int = 0; const monitors = c.glfwGetMonitors(&count); diff --git a/glfw/src/Window.zig b/glfw/src/Window.zig index 22a7205b..77af9cc5 100644 --- a/glfw/src/Window.zig +++ b/glfw/src/Window.zig @@ -540,7 +540,7 @@ pub inline fn setTitle(self: Window, title: [*:0]const u8) Error!void { /// @thread_safety This function must only be called from the main thread. /// /// see also: window_icon -pub inline fn setIcon(self: Window, allocator: *mem.Allocator, images: ?[]Image) Error!void { +pub inline fn setIcon(self: Window, allocator: mem.Allocator, images: ?[]Image) Error!void { internal_debug.assertInitialized(); if (images) |im| { const tmp = try allocator.alloc(c.GLFWimage, im.len); diff --git a/glfw/system_sdk.zig b/glfw/system_sdk.zig index 48b8981f..c7a87409 100644 --- a/glfw/system_sdk.zig +++ b/glfw/system_sdk.zig @@ -110,7 +110,7 @@ fn includeSdkLinuxX8664(b: *Builder, step: *std.build.LibExeObjStep, options: Op step.addLibPath(sdk_root_libs); } -fn getSdkRoot(allocator: *std.mem.Allocator, org: []const u8, name: []const u8, revision: []const u8) ![]const u8 { +fn getSdkRoot(allocator: std.mem.Allocator, org: []const u8, name: []const u8, revision: []const u8) ![]const u8 { // Find the directory where the SDK should be located. We'll consider two locations: // // 1. $SDK_PATH/ (if set, e.g. for testing changes to SDKs easily) @@ -157,7 +157,7 @@ fn getSdkRoot(allocator: *std.mem.Allocator, org: []const u8, name: []const u8, }; } -fn exec(allocator: *std.mem.Allocator, argv: []const []const u8, cwd: []const u8) !void { +fn exec(allocator: std.mem.Allocator, argv: []const []const u8, cwd: []const u8) !void { const child = try std.ChildProcess.init(argv, allocator); child.cwd = cwd; child.stdin = std.io.getStdOut(); @@ -167,7 +167,7 @@ fn exec(allocator: *std.mem.Allocator, argv: []const []const u8, cwd: []const u8 _ = try child.wait(); } -fn confirmAppleSDKAgreement(allocator: *std.mem.Allocator) !bool { +fn confirmAppleSDKAgreement(allocator: std.mem.Allocator) !bool { if (std.process.getEnvVarOwned(allocator, "AGREE")) |agree| { return std.mem.eql(u8, agree, "true"); } else |err| switch (err) {