From 6583c718fdcaf5a52e4ee5fdb54dc0f0b1b214de Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Thu, 18 Jul 2024 15:09:57 +0200 Subject: [PATCH] replace c++ standard int type definitions with the ones from unreal --- .../Private/SenseGlove/Components/SGVirtualHandComponent.cpp | 2 +- Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp | 4 ++-- Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp | 4 ++-- Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index eb1edc82..3f532aec 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -500,7 +500,7 @@ const FTransform& USGVirtualHandComponent::GetHandBoneRefTransform(const FName& const FTransform& USGVirtualHandComponent::GetHandRootBoneRefTransform() const { - static constexpr int32_t WristKeypointIndex = static_cast(EHandKeypoint::Wrist); + static constexpr int32 WristKeypointIndex = static_cast(EHandKeypoint::Wrist); const FTransform& BoneTransform{GetHandBoneRefTransform(WristKeypointIndex)}; return BoneTransform; } diff --git a/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp b/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp index 69013d4f..abf0e47e 100644 --- a/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp +++ b/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp @@ -90,7 +90,7 @@ bool USGBackend::InitializeBackend() if (!IsBackendInitialized()) { #if PLATFORM_ANDROID - const int32_t Result = FSGConnect::Init(); + const int32 Result = FSGConnect::Init(); switch (Result) { case -3: @@ -133,7 +133,7 @@ bool USGBackend::UninitializeBackend() FSGDeviceList::Dispose(); #if PLATFORM_ANDROID - const int32_t Result = FSGConnect::Dispose(); + const int32 Result = FSGConnect::Dispose(); switch (Result) { case -3: diff --git a/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp b/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp index 7430146a..5dab34fe 100644 --- a/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp +++ b/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp @@ -1977,7 +1977,7 @@ bool FSGXRTracker::FImpl::UpdateSGJointData( const FTransform& WorldToTrackingTransform{TrackingToWorldTransform.Inverse()}; const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); - const int32_t JointIndex = static_cast(Joint); + const int32 JointIndex = static_cast(Joint); const FQuat WristRotation{WristTransform.GetRotation()}; const FVector WristLocation{WristTransform.GetLocation()}; @@ -2007,7 +2007,7 @@ bool FSGXRTracker::FImpl::UpdateSGWristJointData( const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); static constexpr EHandKeypoint Joint = EHandKeypoint::Wrist; - static constexpr int32_t JointIndex = static_cast(Joint); + static constexpr int32 JointIndex = static_cast(Joint); OutHandState.KeypointTransforms[JointIndex] = WristTransform; OutHandState.Radii[JointIndex] = 0.01f * WorldToMetersScale; diff --git a/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h b/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h index 527baba8..b5ffb46e 100644 --- a/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h +++ b/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h @@ -56,7 +56,7 @@ public: float Radii[EHandKeypointCount]; - uint8_t bReceivedJointPoses : 1; + uint8 bReceivedJointPoses : 1; public: FSGXRHandState();