glfw: update to new for loop syntax (#711)
This commit is contained in:
parent
5ed584a481
commit
5020979355
1 changed files with 1 additions and 1 deletions
|
@ -488,7 +488,7 @@ pub inline fn setIcon(self: Window, allocator: mem.Allocator, images: ?[]Image)
|
|||
if (images) |im| {
|
||||
const tmp = try allocator.alloc(c.GLFWimage, im.len);
|
||||
defer allocator.free(tmp);
|
||||
for (im) |img, index| tmp[index] = img.toC();
|
||||
for (im, 0..) |img, index| tmp[index] = img.toC();
|
||||
c.glfwSetWindowIcon(self.handle, @intCast(c_int, im.len), &tmp[0]);
|
||||
} else c.glfwSetWindowIcon(self.handle, 0, null);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue