glfw: update system_sdk.zig to latest Zig master

This commit is contained in:
BratishkaErik 2021-12-06 17:35:47 +06:00 committed by Stephen Gutekanst
parent 5b2cb46700
commit 784aa40093
5 changed files with 10 additions and 10 deletions

View file

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