diff --git a/src/terminal/ref_counted_set.zig b/src/terminal/ref_counted_set.zig index 4b470400d..aaaab890a 100644 --- a/src/terminal/ref_counted_set.zig +++ b/src/terminal/ref_counted_set.zig @@ -270,7 +270,7 @@ pub fn RefCountedSet( self.living += 1; return if (added_id == id) null else added_id; - } else if (ctx.eql(base, value, items[id].value)) { + } else if (ctx.eql(value, items[id].value)) { items[id].meta.ref += 1; return null; @@ -396,7 +396,7 @@ pub fn RefCountedSet( if (comptime @hasDecl(Context, "deleted")) { // Inform the context struct that we're // deleting the dead item's value for good. - ctx.deleted(base, item.value); + ctx.deleted(item.value); } self.psl_stats[item.meta.psl] -= 1; @@ -429,7 +429,7 @@ pub fn RefCountedSet( const table = self.table.ptr(base); const items = self.items.ptr(base); - const hash: u64 = ctx.hash(base, value); + const hash: u64 = ctx.hash(value); for (0..self.max_psl + 1) |i| { const p: usize = @intCast((hash + i) & self.layout.table_mask); @@ -461,7 +461,7 @@ pub fn RefCountedSet( // If the item is a part of the same probe sequence, // we check if it matches the value we're looking for. if (item.meta.psl == i and - ctx.eql(base, value, item.value)) + ctx.eql(value, item.value)) { return id; } @@ -487,7 +487,7 @@ pub fn RefCountedSet( .meta = .{ .psl = 0, .ref = 0 }, }; - const hash: u64 = ctx.hash(base, value); + const hash: u64 = ctx.hash(value); var held_id: Id = new_id; var held_item: *Item = &new_item; @@ -516,7 +516,7 @@ pub fn RefCountedSet( if (comptime @hasDecl(Context, "deleted")) { // Inform the context struct that we're // deleting the dead item's value for good. - ctx.deleted(base, item.value); + ctx.deleted(item.value); } chosen_id = id; diff --git a/src/terminal/style.zig b/src/terminal/style.zig index cce20e711..430fca214 100644 --- a/src/terminal/style.zig +++ b/src/terminal/style.zig @@ -247,15 +247,13 @@ pub const Set = RefCountedSet( Id, size.CellCountInt, struct { - pub fn hash(self: *const @This(), base: anytype, style: Style) u64 { + pub fn hash(self: *const @This(), style: Style) u64 { _ = self; - _ = base; return style.hash(); } - pub fn eql(self: *const @This(), base: anytype, a: Style, b: Style) bool { + pub fn eql(self: *const @This(), a: Style, b: Style) bool { _ = self; - _ = base; return a.eql(b); } },