fixing lots of minor issues

This commit is contained in:
2025-12-05 00:36:14 +01:00
parent 4b8aae9eb9
commit 96f69de54f
8 changed files with 78 additions and 30 deletions

View File

@@ -9,8 +9,6 @@ const Alignment = std.mem.Alignment;
const Self = @This();
var fallback_allocator: std.heap.ThreadSafeAllocator = .{ .child_allocator = std.heap.c_allocator };
callbacks: ?vk.AllocationCallbacks,
scope: vk.SystemAllocationScope,
@@ -39,7 +37,7 @@ pub fn from(a: Allocator) *Self {
return self;
}
pub fn clone(self: *Self) Self {
pub inline fn clone(self: *Self) Self {
return self.cloneWithScope(self.scope);
}
@@ -91,5 +89,6 @@ fn free(context: *anyopaque, ptr: []u8, alignment: Alignment, ret_addr: usize) v
}
inline fn getFallbackAllocator() std.mem.Allocator {
var fallback_allocator: std.heap.ThreadSafeAllocator = .{ .child_allocator = std.heap.c_allocator };
return fallback_allocator.allocator();
}