You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Use new inline versions of substring functions
Fix up nearby cases where ESearchCase::CaseSensitive should have been used #jira #rnx #rb #ROBOMERGE-OWNER: marc.audy #ROBOMERGE-AUTHOR: marc.audy #ROBOMERGE-SOURCE: CL 10309793 via CL 10309818 #ROBOMERGE-BOT: (v593-10286020) [CL 10309932 by marc audy in Main branch]
This commit is contained in:
@@ -72,27 +72,27 @@ FString FScriptCodeGeneratorBase::GetClassNameCPP(UClass* Class)
|
||||
|
||||
FString FScriptCodeGeneratorBase::GetPropertyTypeCPP(UProperty* Property, uint32 PortFlags /*= 0*/)
|
||||
{
|
||||
static FString EnumDecl(TEXT("enum "));
|
||||
static FString StructDecl(TEXT("struct "));
|
||||
static FString ClassDecl(TEXT("class "));
|
||||
static FString TEnumAsByteDecl(TEXT("TEnumAsByte<enum "));
|
||||
static FString TSubclassOfDecl(TEXT("TSubclassOf<class "));
|
||||
static const FString EnumDecl(TEXT("enum "));
|
||||
static const FString StructDecl(TEXT("struct "));
|
||||
static const FString ClassDecl(TEXT("class "));
|
||||
static const FString TEnumAsByteDecl(TEXT("TEnumAsByte<enum "));
|
||||
static const FString TSubclassOfDecl(TEXT("TSubclassOf<class "));
|
||||
|
||||
FString PropertyType = Property->GetCPPType(NULL, PortFlags);
|
||||
// Strip any forward declaration keywords
|
||||
if (PropertyType.StartsWith(EnumDecl) || PropertyType.StartsWith(StructDecl) || PropertyType.StartsWith(ClassDecl))
|
||||
if (PropertyType.StartsWith(EnumDecl, ESearchCase::CaseSensitive) || PropertyType.StartsWith(StructDecl, ESearchCase::CaseSensitive) || PropertyType.StartsWith(ClassDecl, ESearchCase::CaseSensitive))
|
||||
{
|
||||
int FirstSpaceIndex = PropertyType.Find(TEXT(" "));
|
||||
PropertyType = PropertyType.Mid(FirstSpaceIndex + 1);
|
||||
int32 FirstSpaceIndex = PropertyType.Find(TEXT(" "), ESearchCase::CaseSensitive);
|
||||
PropertyType.MidInline(FirstSpaceIndex + 1, MAX_int32, false);
|
||||
}
|
||||
else if (PropertyType.StartsWith(TEnumAsByteDecl))
|
||||
else if (PropertyType.StartsWith(TEnumAsByteDecl, ESearchCase::CaseSensitive))
|
||||
{
|
||||
int FirstSpaceIndex = PropertyType.Find(TEXT(" "));
|
||||
int32 FirstSpaceIndex = PropertyType.Find(TEXT(" "), ESearchCase::CaseSensitive);
|
||||
PropertyType = TEXT("TEnumAsByte<") + PropertyType.Mid(FirstSpaceIndex + 1);
|
||||
}
|
||||
else if (PropertyType.StartsWith(TSubclassOfDecl))
|
||||
else if (PropertyType.StartsWith(TSubclassOfDecl), ESearchCase::CaseSensitive)
|
||||
{
|
||||
int FirstSpaceIndex = PropertyType.Find(TEXT(" "));
|
||||
int32 FirstSpaceIndex = PropertyType.Find(TEXT(" "), ESearchCase::CaseSensitive);
|
||||
PropertyType = TEXT("TSubclassOf<") + PropertyType.Mid(FirstSpaceIndex + 1);
|
||||
}
|
||||
return PropertyType;
|
||||
|
||||
Reference in New Issue
Block a user