Wojtek Figat
5fdbed2b56
Minor codestyle adjustments
2025-12-14 22:41:00 +01:00
Wojtek Figat
4846d4b024
Merge branch 'hash_set_crash_fix' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-hash_set_crash_fix
2025-12-14 21:52:40 +01:00
Wojtek Figat
02429266b1
Fix Array::RemoveAtKeepOrder to avoid memory override with large mem copy
2025-12-03 05:03:21 -08:00
Michael Herzog
00f9a28729
Fixed HashSet compaction count after mid-compact growth
...
Ensure HashSetBase::Compact() preserves _elementsCount even when EnsureCapacity() triggers during compaction. The growth path resets the counter; we now cache the original count and restore it after moving all buckets so Count() stays correct in heavy-collision scenarios.
2025-11-28 15:51:57 +01:00
Michael Herzog
d9a18b1d31
Fixed HashSet compact rehash under heavy collisions
...
- Compact now iterates over the old bucket array using the saved oldSize, and frees with that size, avoiding out-of-bounds when _size changes.
- If reinsertion finds no free slot during compaction (pathological collisions), the table grows once and retries, preventing AVs.
- This fix addresses problems with weak hash keys (like #3824 ).
2025-11-25 21:23:49 +01:00
Wojtek Figat
c57e128ff1
Merge remote-tracking branch 'origin/master' into 1.11
...
# Conflicts:
# Source/Engine/Level/Scene/SceneRendering.cpp
# Source/Engine/Physics/Colliders/Collider.cpp
# Source/Engine/Physics/Colliders/Collider.h
2025-09-02 22:23:45 +02:00
Wojtek Figat
ad1163bccc
Fix HashSet::Add returning incorrect value
2025-09-02 21:41:54 +02:00
Wojtek Figat
abe496fe12
Fix crash on particles sorting memory access
2025-08-04 10:31:52 +02:00
Wojtek Figat
8c51ea511a
Fix incorrect documentation comments on HashSet/Dictionary item removal
2025-07-27 11:07:58 +02:00
Wojtek Figat
c0cce748cc
Optimize Array::RemoveAtKeepOrder
2025-07-15 00:12:31 +02:00
Wojtek Figat
a8eb4fc140
Add allocator tag support for Dictionary and HashSet
2025-07-07 23:22:32 +02:00
Wojtek Figat
68dce7e4dd
Merge remote-tracking branch 'origin/master' into 1.11
2025-06-18 22:46:10 +02:00
Wojtek Figat
bcd2b1f0f2
Fix Array::RemoveAt to move element and avoid data copies
2025-06-17 23:27:26 +02:00
Wojtek Figat
eb6010cba7
Fix BitArray again
2025-06-16 23:20:20 +02:00
Wojtek Figat
986693757c
Merge remote-tracking branch 'origin/master' into 1.11
2025-06-16 22:46:17 +02:00
Wojtek Figat
6a82eb114d
Fix BitArray bit indexing
2025-06-16 19:05:44 +02:00
Wojtek Figat
8c62f1120f
Optimize dynamic memory allocations for managed runtime interop collections with a new Arena Allocation
2025-05-25 17:39:20 +02:00
Wojtek Figat
9c3fd052cd
Remove copyright year from source files and update to 2025
2025-04-07 19:22:21 +02:00
Wojtek Figat
4c133fb6ff
Add minor improvement to anim graph editing
2025-03-29 22:33:31 +01:00
Wojtek Figat
5bee99cb93
Add ArrayExtensions::First and fix usage for object pointers
2025-03-28 15:36:03 +01:00
Wojtek Figat
2ab9adab24
Merge remote-tracking branch 'origin/master' into 1.10
2025-02-24 23:27:56 +01:00
Wojtek Figat
3f2eab5206
Optimize divide into multiply
2025-02-20 17:04:20 +01:00
Wojtek Figat
dffc6ea24d
Move hash set related configs into proper header file and rename those
2025-01-24 00:05:07 +01:00
Wojtek Figat
38f74c8cf7
Refactor Dictionary and HashSet to use shared base class
...
Add const iterators
2025-01-23 23:59:31 +01:00
Wojtek Figat
f5280eab74
Refactor and improve collections code
...
#3043
2025-01-23 14:44:11 +01:00
Wojtek Figat
b247070840
Fix regression in Dictionary capacity and use similar improvement in HashSet
2025-01-21 15:38:14 +01:00
Wojtek Figat
1497acef58
SImplify capacity presetting for Dictionary to handle memory slack scale internally as suers care about items count only
2025-01-16 17:42:01 +01:00
Wojtek Figat
d1ac9cd2bc
Minor fixes
2024-12-16 20:07:53 +01:00
Wojtek Figat
a7daf44330
Fix BitArray swap when using different allocators
...
Add unit test to ensure this works correctly.
2024-11-19 12:21:13 +01:00
dd894b510d
Add support for .NET 9 SDK and runtime
2024-11-14 23:05:25 +02:00
Mateusz Karbowiak
dca48b335a
Hash collections bucket state enum extracted
...
This is a small compilation time optimization by reducing total number of generated types. Should not change runtime behavior.
2024-10-31 02:41:51 +01:00
Mateusz Karbowiak
26309a0d41
Dictionary mutable key access for const accessor hack
2024-10-31 01:15:05 +01:00
Mateusz Karbowiak
7cca26bb97
Dictionary cast constiness fix
2024-10-31 01:08:44 +01:00
Mateusz Karbowiak
2ae3932fcc
Revert BitArray changes
2024-10-31 01:06:04 +01:00
Mateusz Karbowiak
5d32ed7f8e
Collections casts constiness fix
2024-10-31 00:49:59 +01:00
Mateusz Karbowiak
fbb840dff3
Collections de/increment operations fix
...
This one is more stylistic but is consistent with practice of using pre- operations for iterators.
2024-10-31 00:45:00 +01:00
Mateusz Karbowiak
9c448f75d8
Collections const correctness fix (style)
2024-10-31 00:29:38 +01:00
Mateusz Karbowiak
66b6a29ed4
Collections iterator move noexcept fix
2024-10-31 00:21:34 +01:00
Mateusz Karbowiak
8cb7fb48ce
Dictionary returning const item fix
...
Returning const object does not prevent from using mutable by triggering copy constructor.
2024-10-31 00:21:33 +01:00
Mateusz Karbowiak
5439efc559
Collections implicit cast constructor fix
...
This one prohibits annoying casts. It is also important for future context injection and follows STL practice.
2024-10-30 22:30:55 +01:00
Mateusz Karbowiak
f77f551b72
Collections type aliasing fix
...
This one is debatable. It follows modern C++.
2024-10-30 22:30:54 +01:00
Mateusz Karbowiak
a55866d558
Collections casts fix
2024-10-30 22:18:47 +01:00
Mateusz Karbowiak
02db7d02f2
Collections const-correctness fix
2024-10-30 21:06:16 +01:00
Wojtek Figat
a18565fd61
Merge remote-tracking branch 'origin/master' into 1.9
2024-08-23 00:05:00 +02:00
Wojtek Figat
23f60da40d
Fix various code issues found using PVS-Studio
2024-08-22 20:24:52 +02:00
Wojtek Figat
e44e44d317
Merge remote-tracking branch 'origin/master' into 1.9
2024-08-05 11:08:51 +02:00
Wojtek Figat
6fbf4a6aac
Optimize draw calls sorting and objects buffer building to be async
2024-07-02 16:07:09 +02:00
Wojtek Figat
b545d8800c
Optimize job system memory allocations
2024-06-24 23:19:01 +02:00
Mateusz Karbowiak
02403377cd
Array move semantics fix
2024-06-22 15:13:53 +02:00
Wojtek Figat
40652a0ebc
Fix HashSet adding item via move operation
2024-05-08 17:28:14 +02:00