You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace private uses of DataStructures::List/Queue/OrderedList/Map/Hash with the standard library (std migration, stage 2) #60
Follow-up to #50 / #58, second of three stages. Depends on #59.
Scope
The general-purpose containers are used 768 times across the library; DataStructures::List alone accounts for 402. This stage converts every use that is not part of a public signature: member variables, locals and private helpers in the 36 Source/src/*.cpp files and in the private sections of headers. Public method and virtual signatures are left exactly as they are (that is stage 3).
Container
References
Replacement
List
402
std::vector
Queue
56
std::deque (or std::queue)
OrderedList
55
sorted std::vector with std::lower_bound, or std::set/std::map where lookups dominate
Hash / HashIndex
11 / 31
std::unordered_map
Map
14
std::map or std::unordered_map
Approach
Mechanical but large; do it per subsystem (reliability layer, peer, each plugin) in separate commits so bisecting stays possible.
Where a value crosses a public boundary (a private std::vector that must be handed out through a still-public DataStructures::List&), add a small conversion at the boundary rather than changing the signature; stage 3 removes those conversions.
Watch for RemoveAtIndexFast (swap-remove, order not preserved) and ring-buffer Queue capacity assumptions; both change iteration order or memory behaviour when swapped for standard types.
Allocations through these containers currently go via rakMalloc/OP_NEW with file-and-line tracking. Decide once whether the standard containers get a std::allocator shim onto rakMalloc or whether that tracking is dropped for them; apply uniformly.
Acceptance
No DataStructures::List|Queue|OrderedList|Map|Hash use remains in Source/src/ or in private/protected sections of headers.
Public declarations unchanged.
Full suite green on Linux (Debug, Release), macOS, Windows; samples build.
Activity
fix(rangelist): merge a value that sits directly above the previous r…
refactor(messagefilter): move the filter and system tables to std con…
refactor(tcpinterface): move to std containers, with tests first
refactor(table): move the protected query helpers to std::vector
test(reliabilitylayer): cover datagram history depth and concurrent s…
refactor(reliabilitylayer): move the protected containers to std cont…
refactor(peer): move the protected lists and queues to std containers
docs(memory): say what the allocator override actually covers
refactor(threadpool): move the three protected queues to std::deque
refactor(packetizedtcp): move the protected containers to std containers