Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Apr 10, 2024
1 parent 7509812 commit 3b57e6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/libs/kine/Kine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace kine {

threepp::Matrix4 result;
for (unsigned i = 0, j = 0; i < components_.size(); ++i) {
auto& c = components_[i];
if (dynamic_cast<KineJoint*>(c.get())) {
result.multiply(joints_[j]->getTransformation(values[j++]));
const auto& c = components_[i];
if (auto joint = dynamic_cast<KineJoint*>(c.get())) {
result.multiply(joint->getTransformation(values.at(j++)));
} else {
result.multiply(c->getTransformation());
}
Expand Down

0 comments on commit 3b57e6a

Please sign in to comment.