st/oxr: Minor clang-tidy fixes.

This commit is contained in:
Ryan Pavlik 2019-08-16 17:02:18 -05:00
parent c048bc0052
commit c8776a8b0d
6 changed files with 26 additions and 28 deletions

View file

@ -319,7 +319,7 @@ XrResult
oxr_xrLocateSpace(XrSpace space,
XrSpace baseSpace,
XrTime time,
XrSpaceLocation* relation);
XrSpaceLocation* location);
//! OpenXR API function @ep{xrDestroySpace}
XrResult
@ -521,7 +521,7 @@ oxr_xrGetInputSourceLocalizedName(
XrResult
oxr_xrApplyHapticFeedback(XrSession session,
const XrHapticActionInfo* hapticActionInfo,
const XrHapticBaseHeader* hapticFeedback);
const XrHapticBaseHeader* hapticEvent);
//! OpenXR API function @ep{xrStopHapticFeedback}
XrResult

View file

@ -255,12 +255,11 @@ oxr_xrGetInstanceProcAddr(XrInstance instance,
oxr_log_init(&log, "xrGetInstanceProcAddr");
return handle_null(&log, name, function);
} else {
struct oxr_instance* inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetInstanceProcAddr");
return handle_none_null(&log, name, function);
}
struct oxr_instance* inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetInstanceProcAddr");
return handle_none_null(&log, name, function);
}

View file

@ -457,7 +457,7 @@ oxr_space_locate(struct oxr_logger *log,
struct oxr_space *spc,
struct oxr_space *baseSpc,
XrTime time,
XrSpaceLocation *relation);
XrSpaceLocation *location);
XrResult
oxr_space_ref_relation(struct oxr_logger *log,
@ -487,7 +487,7 @@ XrResult
oxr_create_swapchain(struct oxr_logger *,
struct oxr_session *sess,
const XrSwapchainCreateInfo *,
struct oxr_swapchain **sc);
struct oxr_swapchain **out_swapchain);
/*

View file

@ -282,7 +282,8 @@ get_pure_space_relation(struct oxr_logger *log,
if (spc->is_reference && baseSpc->is_reference) {
return oxr_space_ref_relation(
log, sess, spc->type, baseSpc->type, time, out_relation);
} else if (!spc->is_reference && !baseSpc->is_reference) {
}
if (!spc->is_reference && !baseSpc->is_reference) {
// @todo Deal with action to action by keeping a true_space that
// we can always go via. Aka poor mans space graph.
// WARNING order not thought through here!
@ -295,11 +296,10 @@ get_pure_space_relation(struct oxr_logger *log,
// math_pose_relate_2(&pose1, &pose2, out_pose);
out_relation->relation_flags = XRT_SPACE_RELATION_BITMASK_NONE;
return XR_SUCCESS;
} else {
oxr_space_action_relation(log, sess, spc, baseSpc, time,
out_relation);
return XR_SUCCESS;
}
oxr_space_action_relation(log, sess, spc, baseSpc, time, out_relation);
return XR_SUCCESS;
}
static void

View file

@ -240,7 +240,7 @@ oxr_system_get_view_conf_properties(
// clang-format off
configurationProperties->viewConfigurationType = sys->view_config_type;
configurationProperties->fovMutable = false;
configurationProperties->fovMutable = XR_FALSE;
// clang-format on
return XR_SUCCESS;

View file

@ -285,7 +285,9 @@ subaction_path_no_dups(struct oxr_logger* log,
"(%s[%u] == XR_NULL_PATH) not a "
"valid subaction path.",
variable, index);
} else if (path == inst->path_cache.user) {
}
if (path == inst->path_cache.user) {
if (sub_paths.user) {
duplicate = true;
} else {
@ -374,18 +376,15 @@ oxr_verify_subaction_path_sync(struct oxr_logger* log,
path == inst->path_cache.right ||
path == inst->path_cache.gamepad) {
return XR_SUCCESS;
} else {
const char* str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
return oxr_error(log, XR_ERROR_PATH_INVALID,
"(actionSets[%i].subactionPath == '%s') path "
"is not a valid subaction path.",
index, str);
}
const char* str = NULL;
size_t length = 0;
return XR_SUCCESS;
oxr_path_get_string(log, inst, path, &str, &length);
return oxr_error(log, XR_ERROR_PATH_INVALID,
"(actionSets[%i].subactionPath == '%s') path "
"is not a valid subaction path.",
index, str);
}
extern "C" XrResult