Commit Graph

281 Commits

Author SHA1 Message Date
ben clayton
b737e5c642 [Core/Containers] Use MALLOCLEAK_IGNORE_SCOPE() for TLS allocations that are never freed
Without this, these allocations are reported as leaks. Technically they are, but I assume they're small and infrequent enough to be ignored.

#rb Steve.Robb

[CL 35966221 by ben clayton in ue5-main branch]
2024-09-03 09:58:38 -04:00
steve robb
1916851fd5 Added FindArbitraryElement to TSet, TMap and TSortedMap.
Added tests.

#rb matt.breindel

[CL 35904526 by steve robb in ue5-main branch]
2024-08-29 15:34:52 -04:00
steve robb
1be01bcb1a Renamed container allocator function parameters to make them less ambiguous about whether they refer to a current state or new (desired) state, and refer to the 'num' (how many elements are constructed inside an allocation) or the 'max' (the total number of elements that the allocation could hold), as it was unclear.
Added a comment to clarify that TNonRelocatableInlineAllocator is itself non-trivially-relocatable, not that it's for non-trivially-relocatable elements.

#rb devin.doucette

[CL 35869531 by steve robb in ue5-main branch]
2024-08-28 11:34:16 -04:00
henrik karlsson
277f0cf7fa Removed dllexported template instantiations when building with merged modules. Reason is because some of the console platform compilers don't handle this properly.
[CL 35832838 by henrik karlsson in ue5-main branch]
2024-08-27 14:41:00 -04:00
wojciech krywult
a54ac9de35 Tests: String: Fixed an incorrect test case in System.Core.String.ConstructFromPtrSizeWithSlack, which was imposing too strict requirements.
#rb wojciech.krywult
#rnx

[CL 35774518 by wojciech krywult in ue5-main branch]
2024-08-23 12:42:27 -04:00
ben clayton
62d8863a01 [AutoRTFM] Make FTSTicker::AddTicker() and FTSTicker::RemoveTicker() transaction-safe
Remove two UE_AUTORTFM_ONCOMMIT2 wrappers in around calls to AddTicker in UPlayspaceManagerComponent, as FTSTicker is now transaction-safe.

#rb Francis.Hurteau, michael.nicolella

[CL 35558314 by ben clayton in ue5-main branch]
2024-08-15 05:05:26 -04:00
steve robb
c1eb798468 Fixed moving arrays of const TArray elements into array of non-const TArray elements.
#rb devin.doucette

[CL 35109825 by steve robb in ue5-main branch]
2024-07-26 11:18:14 -04:00
bart hawthorne
a5eb90b5c8 Fix issue with several VersePath utility functions clearing out existing warning/error messages
#rnx
#rb dave.belanger

[CL 34884591 by bart hawthorne in ue5-main branch]
2024-07-17 16:36:10 -04:00
steve robb
b198c3eae5 Use named FString::ConstructWithSlack constructor instead of ambiguous constructor.
#rb james.hopkin

[CL 34600553 by steve robb in ue5-main branch]
2024-06-24 06:40:39 -04:00
danny couture
d1a0ae6b6d [TSTicker]
- Add support for TUniqueFunction in FTSTicker along with ExecuteFromGameThread

#rnx
#rb ben.zeigler

[CL 34568376 by danny couture in ue5-main branch]
2024-06-21 13:30:58 -04:00
steve robb
f978302ec9 Reverted some changes that were accidentally checked in with the EAutomationTestFlags_ApplicationContextMask change.
[CL 34336617 by steve robb in ue5-main branch]
2024-06-13 08:33:55 -04:00
steve robb
206d9d76b4 Replaced EAutomationTestFlags::ApplicationContextMask with EAutomationTestFlags_ApplicationContextMask.
[CL 34335388 by steve robb in ue5-main branch]
2024-06-13 07:06:47 -04:00
danny couture
d85f0b4139 [Ticker]
- Fix TSAN warning

#rnx
#jira UE-216047
#rb kevin.macaulayvacher

[CL 34064995 by danny couture in ue5-main branch]
2024-06-03 10:02:24 -04:00
steven barnett
673dfc3e62 FBuoyancyParticleData: Do management of per-particle data for buoyancy subsystem inside this structure so that allocation can be done in using alternative data structures. p.Buoyancy.ParticleData.HashIndex enables a lower memory footprint mode. Disabling that cvar leaves original underlying data structures.
FHashTable: Add GetAllocatedSize to FHashTable, and also make Get functions const

[REVIEW] chris.caulfield

[CL 33638038 by steven barnett in ue5-main branch]
2024-05-14 18:08:01 -04:00
steve robb
dea5623bdb Added Algo::Mismatch and some tests.
#rb james.hopkin

[CL 33631344 by steve robb in ue5-main branch]
2024-05-14 12:10:06 -04:00
dave belanger
c57f4b0fa1 Add UE::Core::MakeValidVerseIdentifier to sanitize a string and make it a valid Verse identifier
Deprecate UE::Core::MangleGuidToVerseIdent because the more generic MakeValidVerseIdentifier method provides the same result for a guid
#rb Steve.Robb

[CL 33402479 by dave belanger in ue5-main branch]
2024-05-02 13:44:38 -04:00
dave belanger
956efdc043 Error message in Verse path/domain/identifier validations
#rb Steve.Robb

[CL 33304466 by dave belanger in ue5-main branch]
2024-04-29 12:37:11 -04:00
steve robb
4018d8ea25 Made FUtf8String::Printf's and Appendf's formatting strings be ANSI, because there's no printf which takes a char8_t formatting string. UTF-8-formatted string arguments are still possible via %s.
[CL 33200230 by steve robb in ue5-main branch]
2024-04-24 11:08:11 -04:00
robert millar
60b9ab8d22 TDirectoryTree updates:
Add copy constructor.
Add ContainsChildPaths method.
Add tests to FoundationTests runner.

#rb Matt.Peters

[CL 32831775 by robert millar in ue5-main branch]
2024-04-09 13:42:53 -04:00
robert millar
4033356439 Move TDirectoryTree from CoreUObject to Core.
#rb matt.peters

[CL 32815710 by robert millar in ue5-main branch]
2024-04-08 21:37:55 -04:00
steve robb
c5f206fabc Fixed placement new calls in many Core containers to ensure that they still work with types which haven't overloaded operator new.
#rb james.hopkin

[CL 32247664 by steve robb in ue5-main branch]
2024-03-14 12:09:28 -04:00
steve robb
6c35198546 Fixed inconsistency between EmptyString.ParseIntoArray(Array, DelimiterArray, 1, true) and EmptyString.ParseIntoArray(Array, DelimiterArray[0], true).
Added some tests for this, which also covers the case which was fixed in CL# 31993660.

#rb devin.doucette

[CL 32016140 by steve robb in ue5-main branch]
2024-03-05 06:49:13 -05:00
rob krajcarski
dbbabee5c3 Fix for FString::ParseIntoArray when string to parse has a length of 0, but still has backing memory
#rb Tim.Smith

[CL 31994772 by rob krajcarski in ue5-main branch]
2024-03-04 13:39:16 -05:00
danny couture
b355827697 [LockFreeList]
- Replace platform atomics by std::atomic that allow more fine grained memory ordering
  - Fix AtomicRead that was doing a CAS on windows platforms instead of a less costly read
  - Remove TSAN_SAFE so we can actually test the code for thread safety

#rnx
#jira UE-135685
#rb Daniele.Vettorel

[CL 31717343 by danny couture in ue5-main branch]
2024-02-22 07:21:25 -05:00
steve robb
3c20c6a69d Added FString::RemoveAt(Index, AllowShrinking), to match the TArray::RemoveAt overload.
#rb robert.manuszewski

[CL 31610212 by steve robb in ue5-main branch]
2024-02-19 08:48:08 -05:00