From 61455ff87e4772d9fc51daa597414a46af26327a Mon Sep 17 00:00:00 2001 From: Gabor Koncz Date: Tue, 15 Aug 2023 14:55:19 +0200 Subject: [PATCH] Fix casts of XR handles in OpenXRExtensionWrapperExtension On 32-bit systems, XR handles are defined as uint64_t, so conversion from XR handles to uint64_t requires C-style casts. --- .../openxr/extensions/openxr_extension_wrapper_extension.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openxr/extensions/openxr_extension_wrapper_extension.cpp b/modules/openxr/extensions/openxr_extension_wrapper_extension.cpp index 81ba9c56b8c6..4829f713d2ef 100644 --- a/modules/openxr/extensions/openxr_extension_wrapper_extension.cpp +++ b/modules/openxr/extensions/openxr_extension_wrapper_extension.cpp @@ -126,7 +126,7 @@ void OpenXRExtensionWrapperExtension::on_before_instance_created() { } void OpenXRExtensionWrapperExtension::on_instance_created(const XrInstance p_instance) { - uint64_t instance = reinterpret_cast(p_instance); + uint64_t instance = (uint64_t)p_instance; GDVIRTUAL_CALL(_on_instance_created, instance); } @@ -135,7 +135,7 @@ void OpenXRExtensionWrapperExtension::on_instance_destroyed() { } void OpenXRExtensionWrapperExtension::on_session_created(const XrSession p_session) { - uint64_t session = reinterpret_cast(p_session); + uint64_t session = (uint64_t)p_session; GDVIRTUAL_CALL(_on_session_created, session); }