diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index f212c2ac..6bc0696b 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -469,28 +469,14 @@ USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const { USkeletalMesh* SkeletalMesh{GetMesh()}; ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh object!")); - - return SkeletalMesh-> -#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1 - GetSkeleton() -#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - Skeleton -#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - ; + return SkeletalMesh->GetSkeleton(); } const FReferenceSkeleton& USGVirtualHandComponent::FImpl::GetRefSkeleton() const { - USkeletalMesh* SkeletalMesh{GetMesh()}; + const USkeletalMesh* SkeletalMesh{GetMesh()}; ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh object!")); - - return SkeletalMesh-> -#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1 - GetRefSkeleton() -#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - RefSkeleton -#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */ - ; + return SkeletalMesh->GetRefSkeleton(); } bool USGVirtualHandComponent::FImpl::CheckGlove() const diff --git a/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h b/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h index d9312701..fe086851 100644 --- a/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h +++ b/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h @@ -47,7 +47,7 @@ public: return FMath::DegreesToRadians(Degrees); } - static FORCEINLINE constexpr float TransformToSenseGlove(const int32 Movement, const float Direction) + static FORCEINLINE float TransformToSenseGlove(const int32 Movement, const float Direction) { // 0 = twist, 1 = flexion/extension, 2 = abduction return FMath::DegreesToRadians(Movement != 1 ? Direction * -1.0f : Direction); @@ -94,7 +94,7 @@ public: : Direction; } - static FORCEINLINE constexpr float TransformToUnreal(const ESGThumbMovement Movement, const float Direction) + static FORCEINLINE float TransformToUnreal(const ESGThumbMovement Movement, const float Direction) { ensureAlwaysMsgf(Movement != ESGThumbMovement::None, TEXT("none is not a valid value!"));