Lukas Tenbrink
d6036462b1
Remove hash_map.h include from a_hash_map.h, and remove cross conversion operators.
2025-10-06 17:20:31 +02:00
Lukas Tenbrink
ad600125df
Rewrite HashMapHasherDefault based on type traits - it is now possible to declare a default hashing function for any type.
...
Remove cross-project includes from `hashfuncs.h`.
Improve hashing function for `Color` (based on values instead of `String`).
Move `Variant` comparison from `hash_map.h` to `dictionary.cpp` (`VariantComparatorDictionary`), where it's used.
Remove now unnecessary `HashableHasher`.
2025-10-05 01:49:11 +02:00
Lukas Tenbrink
c6f57c7a55
Change "reserve called with a capacity smaller than the current size" error message to a verbose message.
2025-09-23 20:02:40 +02:00
Lukas Tenbrink
46b88dcbda
Rename internal fields and variables in AHashMap, HashMap and HashSet for consistency.
2025-09-17 19:10:02 +02:00
Lukas Tenbrink
3207066e19
Add Memory::alloc_static_zeroed to allocate memory that's filled with zeroes.
...
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
Lukas Tenbrink
7c37188ca1
Smoke test: In collections, log an error if reserve() is called with a number smaller than the current size. Don't log an error if it is called with a number smaller than the current capacity.
2025-04-23 16:47:47 +02:00
Thaddeus Crews
4c9086312d
Merge pull request #103698 from AThousandShips/fix_a_hash_map_construct
...
[Core] Fix `AHashMap` constructors reserving too few elements
2025-03-23 19:03:59 -05:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
A Thousand Ships
fad8134dca
[Core] Fix AHashMap constructors reserving too few elements
2025-03-06 15:28:37 +01:00
Matias N. Goldberg
7b2f1e1d09
Fix union order to simplify empty initializers
...
This is a followup to PR #101344 (commit
0e06eb80bc ).
Some of them were not an issue because Godot was initializing all
members, but they were "fixed" just in case since it could become a
problem in the future.
Valgrind was specifically complaining about HashMapData &
GlobalPipelineData.
2025-01-14 19:05:01 -03:00
Thaddeus Crews
361e3b4fe8
Core: Expand std::initializer_list support
2024-12-18 18:46:59 -06:00
Nazarii
d1dc7afdd5
Fix capture_cache.animation was not cached
2024-10-31 19:26:02 +02:00
nazarii
76208f7155
Implement array based hash map
2024-10-24 21:34:12 +03:00