Moved GetTypeHash function to be hidden friend instead of put directly in global namespace.
Note that the function/operator needs to be fully inlined in the type or placed in the cpp. If the function is added as friend but then implemented outside the type then hidden friend optimization won't work.
This should improve compile time somewhat according to msvc devs.
#rb Steve.Robb
#preflight 6360b7052b5338aceb26471b
[CL 22889837 by henrik karlsson in ue5-main branch]
This is the majority of the fixes however a few systems have been left for individual CLs.
#jira UE-166285
#preflight 63616567ce676ae868034ab0
#review-22869010
[CL 22889316 by Stephen Holmes in ue5-main branch]
[FYI] Steve.Robb
Original CL Desc
-----------------------------------------------------------------
TMap and TSet can now be declared as members with forward-declared key and value parameters.
KeyFuncs::KeyInitType and KeyFuncs::ElementInitType typedefs are no longer used and user-defined KeyFuncs do not need to provide them. Deprecated placeholders for these typedefs exist though they may not be defined exactly as they were before. A new KeyType typedef needs to be provided by custom KeyFuncs which don't already inherit from BaseKeyFuncs or TDefaultMapKeyFuncs.
KeyConstPointerType, KeyInitType, ValueInitType and ElementInitType typedefs have been deprecated across TMap, TSet and TSortedMap. Regular C++ parameter-passing semantics should be used instead (const T& Ref or T Value, depending on T).
Added missing FSetElementId::operator!=().
[FYI] steve.robb
#rb james.hopkin
[FYI] henrik.karlsson
#preflight 635a56c15d49a96f7b31938f
[CL 22850782 by graeme thornton in ue5-main branch]
KeyFuncs::KeyInitType and KeyFuncs::ElementInitType typedefs are no longer used and user-defined KeyFuncs do not need to provide them. Deprecated placeholders for these typedefs exist though they may not be defined exactly as they were before. A new KeyType typedef needs to be provided by custom KeyFuncs which don't already inherit from BaseKeyFuncs or TDefaultMapKeyFuncs.
KeyConstPointerType, KeyInitType, ValueInitType and ElementInitType typedefs have been deprecated across TMap, TSet and TSortedMap. Regular C++ parameter-passing semantics should be used instead (const T& Ref or T Value, depending on T).
Added missing FSetElementId::operator!=().
#rb james.hopkin
[FYI] henrik.karlsson
#preflight 635a56c15d49a96f7b31938f
[CL 22810695 by steve robb in ue5-main branch]
Memory improvements on top of performance improvements in 11535961.
Allow the hash allocation to shrink for calls to Empty(), Shrink(), Compact() and CompactStable().
Let TSparseArray::Compact() shrink the data array just as for Shrink() and CompactStable().
Note: The private function TSet::ShouldRehash() is only called from Empty() and ConditionalRehash(), and ConditionalRehash() with bAllowShrinking=true is only called from Relax() via Shrink(), so there should be no impact on other/growth scenarios.
Modify GetAllocatedSize() for TSet, TMap and TSparseArray to only return any dynamically allocated size from the underlying allocators and change return type from uint32 to SIZE_T (just as for TArray and FContainerAllocatorInterface).
#rb johan.torp,steve.robb
#preflight 634952f4ce524ed356dafde7, 63496f80f622f6c4bb1c0321, 634d65df9c29024c982ecf26
[CL 22595144 by pj kack in ue5-main branch]
New asset tag added for vpaths, displayed in the content browser.
#rb dave.belanger
#preflight 63330acea4769ad714f8ea2d
[CL 22228539 by Dave Belanger in ue5-main branch]
This is a part of a larger change, 21332740, which fixes TSparseArray::EmplaceAt, which is needed for physics user data.
Slack discussion here: https://epic.slack.com/archives/C024GKBSL/p1663795752638719
[FYI] ian.fox
[CL 22151140 by steven barnett in ue5-main branch]
Even if the array index type is int32, the data buffer can exceed 2Gb.
BulkSerialize requires a cast to ensure the result of NewArrayNum * SerializedElementSize is a 64-bit value.
This should not adversely affect assets previously serialized with BulkSerialize: when saving (but not cooking), the slow path is taken, meaning all the data will be written out correctly.
During cooking and transacting (less permanent operations), the data would have been written and read equally erroneously, so recooking may be required.
#rb Steve.Robb, Robert.Manuszewski, Matt.Peters
#preflight 632490273752284a31829815
[CL 22052384 by richard talbotwatkin in ue5-main branch]
* Added Append/Assign std::initializer_list overloads.
* Implemented std::initializer_list assignment operator overload in term of Assign.
* Fixed Append debug assertion: it now properly uses Reserve instead of Grow: added a comment to Grow as this method expects the container capacity to be smaller than the value requested.
* Added unit tests for both Append and Emplace that force the container to Grow.
#tests passed PagedArray unit test in Debug and Test: verified no assertions are triggered.
#preflight 6315db24ab25bb91f5dc10d3
#rb steve.robb
[CL 21801519 by elias lozadabenavent in ue5-main branch]