Skip to content

Commit db410b5

Browse files
committed
- Update for 5.7. Fixed deprecation warnings.
1 parent 929d368 commit db410b5

4 files changed

Lines changed: 36 additions & 12 deletions

File tree

Source/RyEditorK2Nodes/Private/K2Node_LoadPackageWithPriority.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,11 @@ UEnum* UK2Node_LoadPackageWithPriority::GetRyAsyncLoadingResultEnum()
413413
{
414414
if(!RyAsyncLoadingResultEnum)
415415
{
416+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
417+
RyAsyncLoadingResultEnum = FindObject<UEnum>(nullptr, TEXT("/Script/RyRuntime.ERyAsyncLoadingResult"), EFindObjectFlags::ExactClass);
418+
#else
416419
RyAsyncLoadingResultEnum = FindObject<UEnum>(nullptr, TEXT("/Script/RyRuntime.ERyAsyncLoadingResult"), true);
420+
#endif
417421
check(RyAsyncLoadingResultEnum);
418422
PreloadObject(RyAsyncLoadingResultEnum);
419423
}

Source/RyRuntime/Private/RyRuntimeLevelHelpers.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,11 @@ bool URyRuntimeLevelHelpers::IsLevelPersistentLevel(const ULevel* levelIn)
311311
*/
312312
UObject* URyRuntimeLevelHelpers::FindObjectInLevelByName(ULevel* levelToSearch, const FString& nameToFind)
313313
{
314+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
315+
return StaticFindObject(/*Class=*/ nullptr, levelToSearch, *nameToFind, EFindObjectFlags::ExactClass);
316+
#else
314317
return StaticFindObject(/*Class=*/ nullptr, levelToSearch, *nameToFind, true);
318+
#endif
315319
}
316320

317321
//---------------------------------------------------------------------------------------------------------------------

Source/RyRuntime/Private/RyRuntimeMetaHelpers.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ bool URyRuntimeMetaHelpers::GetEnumIndexFromName(const FString enumName, FName e
1515
#if ENGINE_MAJOR_VERSION < 5
1616
outerIn = ANY_PACKAGE;
1717
#endif
18+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
19+
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName);
20+
#else
1821
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName, false);
22+
#endif
1923
if(!EnumPtr)
2024
{
2125
// Look for the dynamic enum
@@ -57,7 +61,11 @@ bool URyRuntimeMetaHelpers::GetEnumValueFromName(const FString enumName, const F
5761
#if ENGINE_MAJOR_VERSION < 5
5862
outerIn = ANY_PACKAGE;
5963
#endif
64+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
65+
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName);
66+
#else
6067
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName, false);
68+
#endif
6169
if(!EnumPtr)
6270
{
6371
// Look for the dynamic enum
@@ -98,7 +106,11 @@ bool URyRuntimeMetaHelpers::GetEnumNameByIndex(const FString enumName, const uin
98106
#if ENGINE_MAJOR_VERSION < 5
99107
outerIn = ANY_PACKAGE;
100108
#endif
109+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
110+
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName);
111+
#else
101112
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName, false);
113+
#endif
102114
if(!EnumPtr)
103115
{
104116
// Look for the dynamic enum
@@ -134,7 +146,11 @@ bool URyRuntimeMetaHelpers::GetEnumNameByValue(const FString enumName, const int
134146
#if ENGINE_MAJOR_VERSION < 5
135147
outerIn = ANY_PACKAGE;
136148
#endif
149+
#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 7) || ENGINE_MAJOR_VERSION > 5
150+
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName);
151+
#else
137152
const UEnum* EnumPtr = FindObject<UEnum>(outerIn, *enumName, false);
153+
#endif
138154
if(!EnumPtr)
139155
{
140156
// Look for the dynamic enum

Source/RyRuntime/Public/RyRuntimeMathHelpers.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -538,20 +538,20 @@ class RYRUNTIME_API URyRuntimeMathHelpers : public UBlueprintFunctionLibrary
538538
/**
539539
* Checks whether the given location is inside this box.
540540
*
541-
* @param position - The location to test for inside the bounding volume.
541+
* @param in - The location to test for inside the bounding volume.
542542
* @return true if location is inside this volume.
543543
*/
544544
UFUNCTION(BlueprintPure, Category="RyRuntime|Math|Box")
545-
static bool IsPositionInsideBox(const FVector& position, const FBox& box);
545+
static bool IsPositionInsideBox(const FVector& in, const FBox& box);
546546

547547
/**
548548
* Checks whether the given location is inside or on this box.
549549
*
550-
* @param position - The location to test for inside the bounding volume.
550+
* @param in - The location to test for inside the bounding volume.
551551
* @return true if location is inside this volume.
552552
*/
553553
UFUNCTION(BlueprintPure, Category="RyRuntime|Math|Box")
554-
static bool IsPositionInsideOrOnBox(const FVector& position, const FBox& box);
554+
static bool IsPositionInsideOrOnBox(const FVector& in, const FBox& box);
555555

556556
/**
557557
* Checks whether a given box is fully encapsulated by this box.
@@ -565,11 +565,11 @@ class RYRUNTIME_API URyRuntimeMathHelpers : public UBlueprintFunctionLibrary
565565
/**
566566
* Checks whether the given location is inside this box in the XY plane.
567567
*
568-
* @param position - The location to test for inside the bounding box.
568+
* @param in - The location to test for inside the bounding box.
569569
* @return true if location is inside this box in the XY plane.
570570
*/
571571
UFUNCTION(BlueprintPure, Category="RyRuntime|Math|Box")
572-
static bool IsPositionInsideBoxXY(const FVector& position, const FBox& box);
572+
static bool IsPositionInsideBoxXY(const FVector& in, const FBox& box);
573573

574574
/**
575575
* Checks whether the given box is fully encapsulated by this box in the XY plane.
@@ -1073,18 +1073,18 @@ void URyRuntimeMathHelpers::TransformBoxBy(const FBox& boxToTransform, const FTr
10731073
/**
10741074
*/
10751075
FORCEINLINE
1076-
bool URyRuntimeMathHelpers::IsPositionInsideBox(const FVector& position, const FBox& box)
1076+
bool URyRuntimeMathHelpers::IsPositionInsideBox(const FVector& in, const FBox& box)
10771077
{
1078-
return box.IsInside(position);
1078+
return box.IsInside(in);
10791079
}
10801080

10811081
//---------------------------------------------------------------------------------------------------------------------
10821082
/**
10831083
*/
10841084
FORCEINLINE
1085-
bool URyRuntimeMathHelpers::IsPositionInsideOrOnBox(const FVector& position, const FBox& box)
1085+
bool URyRuntimeMathHelpers::IsPositionInsideOrOnBox(const FVector& in, const FBox& box)
10861086
{
1087-
return box.IsInsideOrOn(position);
1087+
return box.IsInsideOrOn(in);
10881088
}
10891089

10901090
//---------------------------------------------------------------------------------------------------------------------
@@ -1100,9 +1100,9 @@ bool URyRuntimeMathHelpers::IsBoxInsideOtherBox(const FBox& box, const FBox& oth
11001100
/**
11011101
*/
11021102
FORCEINLINE
1103-
bool URyRuntimeMathHelpers::IsPositionInsideBoxXY(const FVector& position, const FBox& box)
1103+
bool URyRuntimeMathHelpers::IsPositionInsideBoxXY(const FVector& in, const FBox& box)
11041104
{
1105-
return box.IsInsideXY(position);
1105+
return box.IsInsideXY(in);
11061106
}
11071107

11081108
//---------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)