summaryrefslogtreecommitdiffstats
path: root/modules/openxr/openxr_api.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-07 16:33:17 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-07 16:33:17 +0200
commit0b9ffdfc02d55fc66c5488b757060601bcd86f95 (patch)
tree6dd84f1c49db69eec2cac28f6ad586f0342e57f8 /modules/openxr/openxr_api.cpp
parent074931a3aaad4648a212e00304f0124530b69fc6 (diff)
parent11518665b773e057ec1f3741276e46b0794a229e (diff)
downloadredot-engine-0b9ffdfc02d55fc66c5488b757060601bcd86f95.tar.gz
Merge pull request #81414 from akien-mga/codestyle-get-back-in-das-Auto
Codestyle: Don't use auto where not warranted
Diffstat (limited to 'modules/openxr/openxr_api.cpp')
-rw-r--r--modules/openxr/openxr_api.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index 17f1c3940c..a66afee1c5 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -300,32 +300,31 @@ bool OpenXRAPI::create_instance() {
for (OpenXRExtensionWrapper *wrapper : registered_extension_wrappers) {
const HashMap<String, bool *> &wrapper_request_extensions = wrapper->get_requested_extensions();
- // requested_extensions.insert(wrapper_request_extensions.begin(), wrapper_request_extensions.end());
- for (auto &requested_extension : wrapper_request_extensions) {
+ for (const KeyValue<String, bool *> &requested_extension : wrapper_request_extensions) {
requested_extensions[requested_extension.key] = requested_extension.value;
}
}
- // Check which extensions are supported
+ // Check which extensions are supported.
enabled_extensions.clear();
- for (auto &requested_extension : requested_extensions) {
+ for (KeyValue<String, bool *> &requested_extension : requested_extensions) {
if (!is_extension_supported(requested_extension.key)) {
if (requested_extension.value == nullptr) {
- // nullptr means this is a manditory extension so we fail
+ // Null means this is a manditory extension so we fail.
ERR_FAIL_V_MSG(false, String("OpenXR: OpenXR Runtime does not support ") + requested_extension.key + String(" extension!"));
} else {
- // set this extension as not supported
+ // Set this extension as not supported.
*requested_extension.value = false;
}
} else if (requested_extension.value != nullptr) {
- // set this extension as supported
+ // Set this extension as supported.
*requested_extension.value = true;
- // and record that we want to enable it
+ // And record that we want to enable it.
enabled_extensions.push_back(requested_extension.key.ascii());
} else {
- // record that we want to enable this
+ // Record that we want to enable this.
enabled_extensions.push_back(requested_extension.key.ascii());
}
}
@@ -2077,7 +2076,7 @@ XRPose::TrackingConfidence _transform_from_location(const T &p_location, Transfo
Basis basis;
Vector3 origin;
XRPose::TrackingConfidence confidence = XRPose::XR_TRACKING_CONFIDENCE_NONE;
- const auto &pose = p_location.pose;
+ const XrPosef &pose = p_location.pose;
// Check orientation
if (p_location.locationFlags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT) {