Commit Graph

260 Commits

Author SHA1 Message Date
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
dmytro vovk
2c523f4899 Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
Attempt no. 2
#rb Francis.Hurteau, Matt.Peters

[CL 31123996 by dmytro vovk in ue5-main branch]
2024-02-02 09:59:30 -05:00
sean boocock
5a5ab2b7cd [Backout] - 31084550 - Blocking launching FN editor
[FYI] dmytro.vovk
Original CL Desc
-----------------------------------------------------------------
Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
#rb Francis.Hurteau, Matt.Peters

[CL 31088717 by sean boocock in ue5-main branch]
2024-02-01 11:00:01 -05:00
dmytro vovk
08c3036b27 Fixed default initialization of TLS slots to 0 and invalidity check against 0 as 0 is a valid TLS slot index
#rb Francis.Hurteau, Matt.Peters

[CL 31084584 by dmytro vovk in ue5-main branch]
2024-02-01 08:33:08 -05:00
kevin macaulayvacher
ecde69237e Adds missing GetId() member from TSet::TBaseKeyIterator.
Without this implementation, it's not possible to use GetId() on TMap::TKeyIterators/TConstKeyIterators

This missing implementation is specifically helpful for cases where you'd like to find the KV Pair ElementType for a given KeyArgumentType in cases where you may have collisions between keys and the actual KeyArgumentType value is important.

Example case is when dealing with FNames in Editor since they compare on case-insensitive CompareIds but have unique DisplayIds for different casing. If you want to know the casing used when inserted into a map, you can now do the following:

TMap<FName, FAssetPackageData*>::TConstKeyIterator It = CachedPackageData.CreateConstKeyIterator(PackageFNameOfAnyCase);
FSetElementId Id = It.GetId();
if (!Id.IsValidId())
{
    return nullptr;
}

const TPair<FName, FAssetPackageData*> KVPair = CachedPackageData.Get(Id);
FName PackageNameWithCasingUsedUponInsertion = KVPair.Key;

return KVPair.Value;
#rb Francis.Hurteau, Steve.Robb

[CL 30969014 by kevin macaulayvacher in ue5-main branch]
2024-01-29 10:19:41 -05:00
steve robb
66266c6a11 Fixed up DerivedDataCache, DesktopPlatform, ApplicationCore, AssetRegistry, Core, CoreUObject, Projects, Sockets code to use EAllowShrinking instead of bools.
[CL 30676428 by steve robb in ue5-main branch]
2024-01-17 19:51:06 -05:00
steve robb
e59e206187 Added EAllowShrinking as a better replacement for bAllowShrinking, with optional deprecation.
#rb devin.doucette

[CL 30669734 by steve robb in ue5-main branch]
2024-01-17 16:50:25 -05:00
marc audy
19e84555b3 Silence PVS warnings
[CL 30653812 by marc audy in ue5-main branch]
2024-01-17 01:34:02 -05:00
steve robb
7da84c1d1b Replaced UE_NODISCARD with [[nodiscard]].
[CL 30593744 by steve robb in ue5-main branch]
2024-01-12 10:47:04 -05:00
steve robb
62f2508d7a Added StrConv as a long-term replacement for StringCast, because of the latter's behavior with regards to mid-string zeros.
Fixed FString serialization when it contains a trailing zero.

#rb devin.doucette

[CL 30545356 by steve robb in ue5-main branch]
2024-01-10 14:51:46 -05:00
dave belanger
94e64e5b77 Fix vpath validation: label can start with a numeric
#rb Steve.Robb

[CL 30505240 by dave belanger in ue5-main branch]
2024-01-09 10:47:16 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
carl lloyd
742cd26994 Switching from mtlpp to Apple's MetalCPP library
- Mostly a straight port from mtlpp to MetalCPP
- The debug encoders have been removed in favour of Metal's built in encoder errors, these are always on in debug and development builds
- mtlpp had additional validation that we are now not implementing in the short term, but will revisit after some refactoring

#rb Zack.Neyland

[CL 29773146 by carl lloyd in ue5-main branch]
2023-11-16 05:04:37 -05:00
steve robb
03581cfe15 Added new static StringType::Construct* functions to replace the dubious set of string constructors whose behaviour aren't obvious.
Added deprecation option for the string constructors, which are enabled for FUtf8String and FAnsiString and will be used to incrementally replace usage for FString.

#rb james.hopkin

[CL 29682001 by steve robb in ue5-main branch]
2023-11-13 09:16:12 -05:00
steve robb
ccdbe57e7f Silenced IncludeTool from complaining about the string *.inl files.
#rb trivial

[CL 28449995 by steve robb in ue5-main branch]
2023-10-04 07:27:50 -04:00
steve robb
96a3b4ec26 Added FAnsiString and FUtf8String.
#rb devin.doucette
#jira UE-194628

[CL 28437713 by steve robb in ue5-main branch]
2023-10-03 18:45:10 -04:00
steve robb
e310b0712d Removed CharToEscapeSeqMap and MaxSupportedEscapeChars templates.
#rb trivial
#jira UE-194628

[CL 28434235 by steve robb in ue5-main branch]
2023-10-03 17:30:37 -04:00
steve robb
49c40df975 Disambiguated some more string class implementation details, by name.
#rb devin.doucette
#jira UE-194628

[CL 28431023 by steve robb in ue5-main branch]
2023-10-03 16:40:52 -04:00
steve robb
8481919115 Removed templating from FString implementation functions, to allow them to be defined per-char type and not clash in unity builds.
#rb devin.doucette
#jira UE-194628

[CL 28427431 by steve robb in ue5-main branch]
2023-10-03 15:37:50 -04:00
steve robb
4c7a7800fb Added UTF-8 serialization for non-TCHAR string classes.
#rb devin.doucette
#jira UE-194628

[CL 28413111 by steve robb in ue5-main branch]
2023-10-03 10:15:01 -04:00
steve robb
f105deaf5e Moved reusable StripNegativeZero out of string template code.
#rb trivial
#jira UE-194628

[CL 28408168 by steve robb in ue5-main branch]
2023-10-03 05:12:53 -04:00
steve robb
ca7a4b880b Added UE_STRING_CHARTYPE_IS_TCHAR for switching on that because there's no easy way to compare the UE_STRING_CHARTYPE macro.
Replaced the if constexpr usage in FString's operator<< with the new macro.
Fixed some incorrect usage of CHARTEXT when logging.

#rb devin.doucette
#jira UE-194628

[CL 28391466 by steve robb in ue5-main branch]
2023-10-02 15:59:43 -04:00