Commit Graph

25 Commits

Author SHA1 Message Date
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
henrik karlsson
56e354a63e [Core]
* Fixed so all headers that are supposed to be included independently can compile (there are headers that must be included through other headers)

* Added HEADER_UNIT_SKIP to headers that must be included through others

* Added HEADER_UNIT_UNSUPPORTED to headers that are not supported by platform but is part of the include list anyway (files in Clang folder and pthread files).

* Added HEADER_UNIT_UNSUPPORTED to headers that have bad dependencies and include files from modules they don't depend on. (KeyChainUtilities.h and PackageWriter.h)

#preflight 637281309e3bea8079feb733
#rb devin.doucette

[CL 23127795 by henrik karlsson in ue5-main branch]
2022-11-14 17:08:04 -05: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
christopher waters
f147864ef0 Adding String/RemoveFrom.h
#jira none
#rb devin.doucette
#preflight 62c49a5a2f2d046918927fab

[CL 20948877 by christopher waters in ue5-main branch]
2022-07-05 16:22:50 -04:00
Devin Doucette
2948a8a3ed String: Added string escaping functions under UE::String
#preflight 62283bef31133a23da6704e7
#rb Zousar.Shaker
#rnx

[CL 19319326 by Devin Doucette in ue5-main branch]
2022-03-09 08:48:44 -05:00
Devin Doucette
43e545b658 String: Added range joining functions under UE::String
#preflight 6227de1c695c94f981baa3ad
#rb Zousar.Shaker
#rnx

[CL 19314224 by Devin Doucette in ue5-main branch]
2022-03-08 19:09:39 -05:00
devin doucette
096e40243a Fixed a compile error in String/Find.h
#rb none
#rnx

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 19150074 via CL 19150132 via CL 19159904
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19161656 by devin doucette in ue5-main branch]
2022-02-25 19:53:54 -05:00
steve robb
83f830763d UE::String::Find*() updated to accept UTF8CHAR views.
#rb devin.doucette
#preflight 62180653785f20248bb21fe9

#ROBOMERGE-OWNER: steve.robb
#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19146335 via CL 19147943 via CL 19147966 via CL 19153970
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19161128 by steve robb in ue5-main branch]
2022-02-25 19:35:33 -05:00
devin doucette
79cb2ba983 String: Extended ParseTokens to support ANSICHAR and UTF8CHAR
#rb Matt.Peters
#rnx
#preflight 61f96c2bfa6554dff3d6cbc1

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18812860 in //UE5/Release-5.0/... via CL 18812915 via CL 18822739
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v909-18823584)

[CL 18823986 by devin doucette in ue5-main branch]
2022-02-02 06:26:16 -05:00
benjamin fox
2bc47d77b7 Add ToHostLineEndings FromHostLineEndings functions for FString for converting between different platform line endings
#rb josh.adams
#preflight 61f813a041414fb013cff094

[CL 18792125 by benjamin fox in ue5-main branch]
2022-01-31 12:26:15 -05:00
UnrealBot
c47e81b2cb Branch snapshot for CL 18531810
[CL 18531810 in ue5-main branch]
2022-01-06 16:44:09 +00:00
UnrealBot
2987349d36 Branch snapshot for CL 18514113
[CL 18514113 in ue5-main branch]
2022-01-05 20:41:17 +00:00
devin doucette
28705fad71 Cleaned up namespaces in Core
#rb trivial
#rnx
#preflight 61d4bf4b5d522c9b40850f96

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18521280 in //UE5/Release-5.0/... via CL 18521306
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18521327 by devin doucette in ue5-release-engine-test branch]
2022-01-05 13:08:44 -05:00
aurel cordonnier
e09e764506 Fixing circular include
[FYI] Devin.Doucette
#rnx

#ROBOMERGE-AUTHOR: aurel.cordonnier
#ROBOMERGE-SOURCE: CL 18461373 in //UE5/Release-5.0/... via CL 18461376
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)

[CL 18461378 by aurel cordonnier in ue5-release-engine-test branch]
2021-12-14 18:22:50 -05:00
devin doucette
a4c3b2cf75 Replaced use of TStringView::SizeType with int32 or equivalent casts
SizeType will be deprecated in a subsequent change.

#rb Zousar.Shaker
#rnx
#preflight 61b8dde95d1b7767a13a5a70

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18456907 in //UE5/Release-5.0/... via CL 18456915
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)

[CL 18456926 by devin doucette in ue5-release-engine-test branch]
2021-12-14 14:07:35 -05:00
devin doucette
9c37929019 String: Extended ParseTokens and ParseLines
- Added option flags to control skipping empty tokens/lines, trimming tokens/lines, and ignoring delimiter case.
- Added overloads that add to an output object, such as an array.

#rb Zousar.Shaker
#preflight 61afaba0f27f993dc82117eb

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18400340 in //UE5/Release-5.0/... via CL 18400346
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18400354 by devin doucette in ue5-release-engine-test branch]
2021-12-07 16:35:00 -05:00
devin doucette
18af1d3ea9 Added UTF-8 support to a few functions
#rb Zousar.Shaker
#rnx
#preflight 611bfbf42c1f1c0001ce1194

#ROBOMERGE-SOURCE: CL 17210836 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17210856 by devin doucette in ue5-release-engine-test branch]
2021-08-17 23:45:31 -04:00
Devin Doucette
940e894eec Added BytesToHexLower and cleaned up BytesToHex and HexToBytes
#rb Zousar.Shaker

[CL 15083290 by Devin Doucette in ue5-main branch]
2021-01-14 09:52:51 -04:00
devin doucette
8987554ad9 Changed indentation of code in namespaces
#rb none
#rnx

[CL 14547954 by devin doucette in ue5-main branch]
2020-10-22 15:17:01 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
devin doucette
0174be282a Added and used StringFwd.h for string builder and string view declarations
Including StringFwd.h in place of forward declarations offers more flexibility to change how these types are declared.

#jira none
#rb Steve.Robb
[RN] minor Core

#ROBOMERGE-SOURCE: CL 12235779 in //UE4/Release-4.25/... via CL 12235792
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v664-12234175)

[CL 12237495 by devin doucette in Main branch]
2020-03-17 20:03:03 -04:00
devin doucette
f50c772c5d Add UE::String::BytesToHex, UE::String::HexToBytes, FString += FStringView
- Both hex functions work the same as their FString equivalents but without requiring FString as input or output.
- Optimize TCharToNibble to do a check at the end instead of at the start, as the previous implementation causes the character ranges to be tested twice.
- Change HexToBytes from FString to use UE::String::HexToBytes.
- Add FString += FStringView to facilitate conversion to FStringView.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10711451 by Devin.Doucette
#ushell-cherrypick of 10720873 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162861 via CL 11162877 via CL 11162886
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166825 by devin doucette in Main branch]
2020-01-29 15:14:57 -05:00
devin doucette
9bee01e44a Implement LexFromString from FStringView for primitive types
These implementations are not optimized yet. They exist to allow conversion from FString to FStringView.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10720867 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162860 via CL 11162876 via CL 11162885
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166821 by devin doucette in Main branch]
2020-01-29 15:14:54 -05:00
devin doucette
1e26a384a7 Add UE::String::ParseLines, UE::String::ParseTokens[Multiple]
- UE::String::ParseLines can be used to split a string view on line endings to find the non-empty lines in the view. Intended to replace functions like FString::ParseIntoArrayLines and FFileHelper::LoadFileToStringArray.
- UE::String::ParseTokens[Multiple] can be used to split a string view on one or more single-character or multi-character delimiters. Intended to replace FString::ParseIntoArray. Separate handling of single-character delimiters reduced the cost by 27% in the case being profiled.
- Extend Algo::CompareByPredicate to allow the input ranges to be different types and to take them by universal reference.
- Extend TArrayView and MakeArrayView to allow array views to be created from initializer lists.

#rb Matt.Peters, Steve.Robb
#ushell-cherrypick of 10720885 by Devin.Doucette
#ushell-cherrypick of 10812084 by Devin.Doucette


#ROBOMERGE-SOURCE: CL 11162858 via CL 11162872 via CL 11162884
#ROBOMERGE-BOT: (v640-11091645)

[CL 11166820 by devin doucette in Main branch]
2020-01-29 15:14:51 -05:00