mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
minor fixes in hash table
This commit is contained in:
committed by
Ryan Fleury
parent
0f81aae985
commit
a60216fa9f
@@ -271,12 +271,12 @@ hash_table_search_string_u64(HashTable *ht, String8 key, U64 *value_out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal B32
|
internal B32
|
||||||
hash_table_search_string_raw(HashTable *ht, String8 key, void **value_out)
|
hash_table_search_string_raw(HashTable *ht, String8 key, void *value_out)
|
||||||
{
|
{
|
||||||
KeyValuePair *result = hash_table_search_string(ht, key);
|
KeyValuePair *result = hash_table_search_string(ht, key);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (value_out) {
|
if (value_out) {
|
||||||
*value_out = result->value_raw;
|
(*(void **)value_out) = result->value_raw;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ key_value_pair_is_before_u64(void *a, void *b)
|
|||||||
internal int
|
internal int
|
||||||
key_value_pair_is_before_string_sensitive(void *a, void *b)
|
key_value_pair_is_before_string_sensitive(void *a, void *b)
|
||||||
{
|
{
|
||||||
return str8_compar_case_sensitive(((KeyValuePair*)a)->key_string, ((KeyValuePair*)b)->key_string) < 0;
|
return str8_compar_case_sensitive(&((KeyValuePair*)a)->key_string, &((KeyValuePair*)b)->key_string) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal U32 *
|
internal U32 *
|
||||||
@@ -415,3 +415,4 @@ remove_duplicates_str8_list(Arena *arena, String8List list)
|
|||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user