mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-08 12:54:28 +00:00
perf: fix accidental overhead in refcountedset
This commit is contained in:
@@ -549,9 +549,12 @@ pub fn RefCountedSet(
|
||||
}
|
||||
|
||||
/// Insert the given value into the hash table with the given ID.
|
||||
/// asserts that the value is not already present in the table.
|
||||
///
|
||||
/// If runtime safety is enabled, asserts that
|
||||
/// the value is not already present in the table.
|
||||
fn insert(self: *Self, base: anytype, value: T, new_id: Id, ctx: Context) Id {
|
||||
assert(self.lookupContext(base, value, ctx) == null);
|
||||
if (comptime std.debug.runtime_safety)
|
||||
assert(self.lookupContext(base, value, ctx) == null);
|
||||
|
||||
const table = self.table.ptr(base);
|
||||
const items = self.items.ptr(base);
|
||||
|
||||
Reference in New Issue
Block a user