From fdbe6d60d1a937ee64f4e37c2acd0c76a7588f24 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Mon, 5 May 2025 21:16:31 +0200 Subject: [PATCH] examples: clean up extension_names --- examples/graphics_context.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/graphics_context.zig b/examples/graphics_context.zig index e5c993e..aaa4e7c 100644 --- a/examples/graphics_context.zig +++ b/examples/graphics_context.zig @@ -58,11 +58,7 @@ pub const GraphicsContext = struct { var glfw_exts_count: u32 = 0; const glfw_exts = c.glfwGetRequiredInstanceExtensions(&glfw_exts_count); - - var i: usize = 0; - while (i < glfw_exts_count) : (i += 1) { - try extension_names.append(glfw_exts[i]); - } + try extension_names.appendSlice(@ptrCast(glfw_exts[0..glfw_exts_count])); const instance = try self.vkb.createInstance(&.{ .p_application_info = &.{