Skip to content

Commit df3bfe4

Browse files
committed
Fix build on 32bit arch.
1 parent b41e1dd commit df3bfe4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/tydra/usd-export.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
198198

199199
std::vector<value::token> joints(joint_idMap.size());
200200
for (const auto &channels : anim.channels_map) {
201-
joints[joint_idMap.at(channels.first)] = value::token(channels.first);
201+
joints[size_t(joint_idMap.at(channels.first))] = value::token(channels.first);
202202
}
203203
dst->joints = joints;
204204

@@ -307,7 +307,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
307307
if (tx_it->second.translations.static_value) {
308308
uint64_t joint_id = joint_idMap.at(channels.first);
309309
if ((joint_id +1) > static_txs.size()) {
310-
static_txs.resize(joint_id+1);
310+
static_txs.resize(size_t(joint_id+1));
311311
}
312312
static_txs[size_t(joint_id)] = tx_it->second.translations.static_value.value();
313313
}
@@ -382,7 +382,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
382382
if (rot_it->second.rotations.static_value) {
383383
uint64_t joint_id = joint_idMap.at(channels.first);
384384
if ((joint_id +1) > static_rots.size()) {
385-
static_rots.resize(joint_id+1);
385+
static_rots.resize(size_t(joint_id+1));
386386
}
387387
value::quatf v;
388388
v[0] = rot_it->second.rotations.static_value.value()[0];
@@ -457,7 +457,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
457457
if (scale_it->second.rotations.static_value) {
458458
uint64_t joint_id = joint_idMap.at(channels.first);
459459
if ((joint_id +1) > static_scales.size()) {
460-
static_scales.resize(joint_id+1);
460+
static_scales.resize(size_t(joint_id+1));
461461
}
462462
value::half3 v;
463463
v[0] = value::float_to_half_full(scale_it->second.scales.static_value.value()[0]);
@@ -492,7 +492,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
492492

493493
std::vector<value::token> blendShapes(target_idMap.size());
494494
for (const auto &target : anim.blendshape_weights_map) {
495-
blendShapes[target_idMap.at(target.first)] = value::token(target.first);
495+
blendShapes[size_t(target_idMap.at(target.first))] = value::token(target.first);
496496
}
497497
dst->blendShapes = blendShapes;
498498

@@ -527,7 +527,7 @@ static bool ExportSkelAnimation(const Animation &anim, SkelAnimation *dst, std::
527527
if (target.second.static_value) {
528528
uint64_t target_id = target_idMap.at(target.first);
529529
if ((target_id +1) > static_weights.size()) {
530-
static_weights.resize(target_id+1);
530+
static_weights.resize(size_t(target_id+1));
531531
}
532532
static_weights[size_t(target_id)] = target.second.static_value.value();
533533
}

0 commit comments

Comments
 (0)