Commit Graph

221 Commits

Author SHA1 Message Date
Steve Robb
98ea600a3e Fixed TSortedMap's key iterators.
Added operator* and operator-> to TMap's key iterators.
Added key iterator tests.

#rb devin.doucette
#jira none
#preflight 6437052b4c0cdaea09654543

[CL 25022181 by Steve Robb in ue5-main branch]
2023-04-13 05:24:47 -04:00
robert millar
fe17757ea8 Expose access to FSetElementId on TMap as well as TSet.
- GetMaxIndex returns max usable index for underlying sparse storage.
- IsValidId returns whether anything is stored at given index.
- Get returns stored element reference. (Requires IsValidId to return true). (Not using operator[] to prevent confusion with access by map key).
- Iterators have GetId function to return current index for later use with Get.
- Added Get functions to Set to match new interface on Map.

#rb steve.robb,justin.marcus

[CL 24773623 by robert millar in ue5-main branch]
2023-03-23 22:41:44 -04:00
Andriy Tylychko
3e75268230 removed the old FTicker that was deprecated in 5.0
#preflight 6400ac55c63aaf1e136075c5
#rb francis.hurteau
#preflight 640782937348fee37b0ab4c2

[CL 24544720 by Andriy Tylychko in ue5-main branch]
2023-03-07 13:53:21 -05:00
devin doucette
0a31a5dc5b Added a missing include to ContainerAllocationPolicies.cpp
#rb none
#rnx

[CL 24406416 by devin doucette in ue5-main branch]
2023-02-24 14:43:35 -05:00
steve robb
366afe8f47 Unshelved from pending changelist '24339224':
Added checks for invalid element counts in various allocators' ResizeAllocation() functions.

[REVIEW] [at]johan.torp
#preflight 63f4e4f1500c05a624a9fe5e
#localization none
#tests preflight, local runs to ensure everything is still fine, runs with deliberately engineered huge reallocations to show that bad resizes are caught.

[CL 24404851 by steve robb in ue5-main branch]
2023-02-24 13:43:13 -05:00
chris caulfield
17ec8ae181 Add TSparseArray::SortFreeList (required for determinism in Chaos)
#jira UE-174949
#rb benn.gallagher, steve.robb
#preflight 63dafca2dd029837762ee915

[CL 23975153 by chris caulfield in ue5-main branch]
2023-02-02 14:38:10 -05:00
Steve Robb
529884c634 Copied over unity build fixes.
#rb trivial
#jira none
#preflight none

[CL 23967436 by Steve Robb in ue5-main branch]
2023-02-02 09:34:29 -05:00
steve robb
44f4ac8120 Added check for invalid reserves in TSet.
#rb johan.torp
#preflight 63da89a49f6dbf248dea9dfc

[CL 23966847 by steve robb in ue5-main branch]
2023-02-02 08:44:17 -05:00
Matt Peters
26b8e9777a String functions: Delete ParseIntoArray; it is redundant with the existing ParseTokens.
#rb Devin.Doucette
#rnx
#preflight 63d92d27f626715201da012a

[CL 23927168 by Matt Peters in ue5-main branch]
2023-01-31 10:21:43 -05:00
Matt Peters
9d0f1a1187 Cooker: Some function-level optimizations for CookByTheBook.
Results from  a 2.3hr cook session:
EvaluateGarbageCollectionResults: Skip SoftGC diagnostics if not running a memory diagnostic cook.
112s -> 0.05s

GetNeverCookPackageFileNames: Use FDirectoryTree instead of linear search.
20s -> 1.2s

AssignLayerChunkDelegate: Cache the ChunkLayerAssignment map from ini because the function can be called multiple times.
11.5s -> 0.01s

InitializeFromExistingAndPrune: Use FName WriteToString instead of ToString.
6.8s -> 6.8s (no change)

TJsonStringWriter::Close: Reserve the OutString to make only a single allocation
2.8s -> 2.2s

MakePathRelativeTo: Use TInlineAllocators and FStringView in the ParseIntoArray arrays, use TArrayView.RightChop instead of RemoveAt, presize the output string.
2.7s -> 1.5s

#rb Zousar.Shaker
#rnx
#preflight 63d81355ec3d1af440a6ab81

[CL 23915442 by Matt Peters in ue5-main branch]
2023-01-30 15:42:40 -05:00
steve robb
4900d8a570 Replaced TModels traits class with TModels_V.
#rb devin.doucette
#preflight 63d3aabf5354589b5cd2343b

[CL 23889491 by steve robb in ue5-main branch]
2023-01-27 14:51:16 -05:00
Matt Peters
f8cec47556 FString/CString: Change FString::Contains, FString::Find, and TCString::Stristr to return success when the Find argument is EmptyString, when called with ESearchCase::IgnoreCase. This change makes the IgnoreCase behavior match the CaseSensitive behavior, and match the behavior of standard library strstr. But this will break callsites that were expecting Contains("") to return false, and those callsites will need to be changed as they are discovered.
FString: Add FStringView override for Contains.
#rn Minor, Core
#rb Steve.Robb
#preflight 6391eb07c415e8dc78328e56

[CL 23445910 by Matt Peters in ue5-main branch]
2022-12-08 09:30:02 -05:00
dave belanger
47d61f95be - Fix FVersePath::IsValidSubpath
- Add FVersePath::IsValidIdent
- Add MangleGuidToVerseIdent
#rb Steve.Robb
#preflight 638a70a90e4613faed5ac994

[CL 23394651 by dave belanger in ue5-main branch]
2022-12-05 13:19:30 -05:00
Matt Peters
9e2cf331d3 Fix change in behavior to FString::Find: when called with an empty string and IgnoreCase it should return INDEX_NONE and a recent change had changed this to return 0 instead.
#jira UE-171641
#rb Ben.Zeigler
#rnx
#preflight 6389152bb36822f1c3488a05

[CL 23362911 by Matt Peters in ue5-main branch]
2022-12-01 16:42:48 -05:00
Matt Peters
5f07e4d2fc FString: Add FStringView overloads for RemoveFromStart, RemoveFromEnd, Find, StartsWith, EndsWith, MatchesWildcard.
TCString: Add Strnstr and Strnistr.
#preflight 638611e8170bc34a93afe39a
#rb Devin.Doucette, Steve.Robb
#rnx

[CL 23306326 by Matt Peters in ue5-main branch]
2022-11-29 09:58:29 -05:00
Rafa Lecina
df001c1d21 Support enable ARC in modules
#jira UE-107891
#review @Sam.Zamani @Bertrand.Carre @Chris.Varnsverry @Roman.Dzieciol @Josh.Adams  @Jack.Porter
#preflight

[CL 23133821 by Rafa Lecina in ue5-main branch]
2022-11-15 06:02:36 -05:00
joe pribele
1d8537f20b changed PRAGMA_DISABLE_OPTIMIZATION to UE_DISABLE_OPTIMIZATION_SHIP
#preflight 6372ba60ee4d25f90ae3d207

[CL 23128414 by joe pribele in ue5-main branch]
2022-11-14 17:31:05 -05:00
steve robb
4a33da509f Replaced the OOM in TArray::OnInvalidNum() with a UE_LOG(Fatal).
#rb elizabeth.bunner
#jira none
#preflight 635824a97a09a4c1bc474e3d

[CL 22793162 by steve robb in ue5-main branch]
2022-10-26 17:33:46 -04:00
pj kack
7a12aa6728 TSet & TMap: Make sure any dynamic hash allocation is released when Empty() is called without additional slack.
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]
2022-10-18 04:03:13 -04:00
Dave Belanger
453d3b16dd UE::Core::FVersePath added.
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]
2022-09-28 15:09:48 -04:00
bryan sefcik
746b7df074 Same as CL 20991367:
Updated Core code to not use CoreMinimal.h when possible.
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c74ed0324817d81488b7ee

[CL 20993420 by bryan sefcik in ue5-main branch]
2022-07-07 17:41:31 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
steve robb
fd2a0b1e20 Removal of TEXT literal concatenations, which doesn't work in UTF-8 mode.
#rb devin.doucette
#jira UE-132142
#preflight 62a8748fa76c84377748036b

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 20647443 via CL 20648283 via CL 20648315
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20651786 by steve robb in ue5-main branch]
2022-06-14 12:46:34 -04:00
andy sonnenburg
c92909d7cb Avoid calling memcpywith nullptr argument when TArray::operator== is invoked on two empty arrays.
#rb steve.robb



#preflight 627c01de1e749933439e6921

#ROBOMERGE-AUTHOR: andy.sonnenburg
#ROBOMERGE-SOURCE: CL 20147512 via CL 20148803 via CL 20150489 via CL 20151057
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20154307 by andy sonnenburg in ue5-main branch]
2022-05-11 19:39:34 -04:00
Devin Doucette
07adff9b17 LowLevelTests: Reverted the Core tests that were moved in 19498448 and 19571202
#preflight 62471e0e73665f7d5e634d2d
#rb Chris.Constantinescu, Mark.Lintott
#rnx

[CL 19589944 by Devin Doucette in ue5-main branch]
2022-04-01 12:14:09 -04:00