From 32a5db13717a3d3ec96c993ad3718b057d09726f Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Tue, 26 Jul 2022 23:36:09 -0700 Subject: [PATCH] use reftable instead and update interface --- src/rendering/textures.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rendering/textures.zig b/src/rendering/textures.zig index ead85ee..1771f8c 100644 --- a/src/rendering/textures.zig +++ b/src/rendering/textures.zig @@ -1,10 +1,10 @@ const vk = @import("vulkan"); const UUID = @import("../common/uuid.zig").UUID; -const Table = @import("../containers/table.zig").Table; +const RefTable = @import("../containers/table.zig").RefTable; const Vec2i = @import("../math/vec.zig").Vec2i; -const TTable = Table(UUID, Texture); +const TTable = RefTable(UUID, Texture); var s_table: TTable = undefined; pub fn init() void { @@ -51,7 +51,7 @@ pub const Texture = packed struct { slot: Id, pub fn get(id: Id) ?*const Self { - return s_table.get(id); + return s_table.getPtr(id); } pub fn isCurrent(id: Id) bool {