diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-29 15:50:29 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-29 15:50:29 +0000 |
| commit | 1dfe0cdd1de44d6c8b94c4e902a731655f8972c9 (patch) | |
| tree | 326812daa6c1351ac23f3a94bd14e3d480febe85 /src/check_type.cpp | |
| parent | 97c66c9c732af1e0735ee3f48a8af08b199bddf9 (diff) | |
Simplify hashing approach `map`
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 758d1969b..8da410fa9 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2849,11 +2849,11 @@ void init_map_internal_types(Type *type) { } void add_map_key_type_dependencies(CheckerContext *ctx, Type *key) { - if (is_type_string(key)) { - add_package_dependency(ctx, "runtime", "default_hash_string"); + if (is_type_cstring(key)) { + add_package_dependency(ctx, "runtime", "default_hasher_cstring"); + } else if (is_type_string(key)) { add_package_dependency(ctx, "runtime", "default_hasher_string"); } else if (!is_type_polymorphic(key)) { - add_package_dependency(ctx, "runtime", "default_hash_ptr"); GB_ASSERT_MSG(is_type_simple_compare(key), "%s", type_to_string(key)); i64 sz = type_size_of(key); |