Skip to content

Commit

Permalink
Don't use extra variable in yaml_utils.h for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason committed Jul 29, 2024
1 parent 5dc73c0 commit 9d67963
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tesseract_common/include/tesseract_common/yaml_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ struct convert<Eigen::VectorXd>
static Node encode(const Eigen::VectorXd& rhs)
{
Node node;
long l = static_cast<long>(rhs.size());
for (long i = 0; i < l; ++i)
for (long i = 0; i < static_cast<long>(rhs.size()); ++i)
node.push_back(rhs(i));

return node;
Expand All @@ -345,8 +344,7 @@ struct convert<Eigen::VectorXd>
return false;

rhs.resize(static_cast<long>(node.size()));
long l = static_cast<long>(node.size());
for (long i = 0; i < l; ++i)
for (long i = 0; i < static_cast<long>(node.size()); ++i)
rhs(i) = node[i].as<double>();

return true;
Expand Down

0 comments on commit 9d67963

Please sign in to comment.