mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-11 16:18:07 +00:00
rdi_make: allow duplicates in bake name map insertions - they become extremely costly to check for, and we don't produce them anyways...
This commit is contained in:
@@ -1807,29 +1807,12 @@ rdim_bake_name_map_insert(RDIM_Arena *arena, RDIM_BakeNameMapTopology *map_topol
|
||||
{
|
||||
slot = map->slots[slot_idx] = rdim_push_array(arena, RDIM_BakeNameChunkList, 1);
|
||||
}
|
||||
RDI_S32 is_duplicate = 0;
|
||||
for(RDIM_BakeNameChunkNode *n = slot->first; n != 0; n = n->next)
|
||||
{
|
||||
for(RDI_U64 n_idx = 0; n_idx < n->count; n_idx += 1)
|
||||
{
|
||||
if(rdim_str8_match(n->v[n_idx].string, string, 0) &&
|
||||
n->v[n_idx].idx == idx)
|
||||
{
|
||||
is_duplicate = 1;
|
||||
goto break_all;
|
||||
}
|
||||
}
|
||||
}
|
||||
break_all:;
|
||||
if(!is_duplicate)
|
||||
{
|
||||
RDIM_BakeName *bstr = rdim_bake_name_chunk_list_push(arena, slot, chunk_cap);
|
||||
bstr->string = string;
|
||||
bstr->idx = idx;
|
||||
bstr->hash = hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: [Baking Helpers] Deduplicated Path Baking Tree
|
||||
|
||||
Reference in New Issue
Block a user