Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-30 07:16:14 +0300
committerCampbell Barton <campbell@blender.org>2022-09-30 07:51:49 +0300
commit8bdd4b468554446cb1351785f0db751e2f84341f (patch)
treed81bda8a17f036de212b2982d7b13093f5b35a9e /intern
parent1c1dc5f8440d918aca480904c53e31a528aef42f (diff)
Cleanup: use function style casts for C++
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_XrControllerModel.cpp10
-rw-r--r--intern/ghost/intern/GHOST_XrSession.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_XrControllerModel.cpp b/intern/ghost/intern/GHOST_XrControllerModel.cpp
index c841fc0cf46..0a8b0dcb003 100644
--- a/intern/ghost/intern/GHOST_XrControllerModel.cpp
+++ b/intern/ghost/intern/GHOST_XrControllerModel.cpp
@@ -296,7 +296,7 @@ static void load_node(const tinygltf::Model &gltf_model,
float world_transform[4][4];
GHOST_XrControllerModelNode &node = nodes.emplace_back();
- const int32_t node_idx = (int32_t)(nodes.size() - 1);
+ const int32_t node_idx = int32_t(nodes.size() - 1);
node.parent_idx = parent_idx;
calc_node_transforms(gltf_node, parent_transform, node.local_transform, world_transform);
@@ -496,7 +496,7 @@ void GHOST_XrControllerModel::loadControllerModel(XrSession session)
std::vector<XrControllerModelNodePropertiesMSFT> node_properties(
model_properties.nodeCountOutput, {XR_TYPE_CONTROLLER_MODEL_NODE_PROPERTIES_MSFT});
- model_properties.nodeCapacityInput = (uint32_t)node_properties.size();
+ model_properties.nodeCapacityInput = uint32_t(node_properties.size());
model_properties.nodeProperties = node_properties.data();
CHECK_XR(g_xrGetControllerModelPropertiesMSFT(session, m_model_key, &model_properties),
"Failed to get controller model node properties.");
@@ -583,11 +583,11 @@ void GHOST_XrControllerModel::updateComponents(XrSession session)
void GHOST_XrControllerModel::getData(GHOST_XrControllerModelData &r_data)
{
if (m_data_loaded) {
- r_data.count_vertices = (uint32_t)m_vertices.size();
+ r_data.count_vertices = uint32_t(m_vertices.size());
r_data.vertices = m_vertices.data();
- r_data.count_indices = (uint32_t)m_indices.size();
+ r_data.count_indices = uint32_t(m_indices.size());
r_data.indices = m_indices.data();
- r_data.count_components = (uint32_t)m_components.size();
+ r_data.count_components = uint32_t(m_components.size());
r_data.components = m_components.data();
}
else {
diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 0031c1f1278..e8f9b96b15c 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -745,7 +745,7 @@ bool GHOST_XrSession::attachActionSets()
for (auto &[profile, bindings] : profile_bindings) {
bindings_info.interactionProfile = profile;
- bindings_info.countSuggestedBindings = (uint32_t)bindings.size();
+ bindings_info.countSuggestedBindings = uint32_t(bindings.size());
bindings_info.suggestedBindings = bindings.data();
CHECK_XR(xrSuggestInteractionProfileBindings(instance, &bindings_info),
@@ -754,7 +754,7 @@ bool GHOST_XrSession::attachActionSets()
/* Attach action sets. */
XrSessionActionSetsAttachInfo attach_info{XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO};
- attach_info.countActionSets = (uint32_t)m_oxr->action_sets.size();
+ attach_info.countActionSets = uint32_t(m_oxr->action_sets.size());
/* Create an aligned copy of the action sets to pass to xrAttachSessionActionSets(). */
std::vector<XrActionSet> action_sets(attach_info.countActionSets);
@@ -776,7 +776,7 @@ bool GHOST_XrSession::syncActions(const char *action_set_name)
XrActionsSyncInfo sync_info{XR_TYPE_ACTIONS_SYNC_INFO};
sync_info.countActiveActionSets = (action_set_name != nullptr) ? 1 :
- (uint32_t)action_sets.size();
+ uint32_t(action_sets.size());
if (sync_info.countActiveActionSets < 1) {
return false;
}