Skip to content

Commit 7fb4ac6

Browse files
fix(core): Use non-static methods that are CLang templates compliant
1 parent 6a84cf6 commit 7fb4ac6

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

source/Time.hpp

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,8 @@ class SchemeBase : public Scheme
534534
(bodies[i]->type != Body::CPLDPIN))
535535
continue;
536536
auto [pos, vel] = bodies[i]->initialize();
537-
auto r = AS_STATE(_r[0])->get(bodies[i]);
538-
r.row(0).head<7>() = pos.toVec7();
539-
r.row(0).tail<6>() = vel;
537+
AS_STATE(_r[0])->get(bodies[i]).row(0).head<7>() = pos.toVec7();
538+
AS_STATE(_r[0])->get(bodies[i]).row(0).tail<6>() = vel;
540539
for (unsigned int j = 0; j < NDERIV; j++)
541540
AS_STATE(_rd[j])->get(bodies[i]).setZero();
542541
}
@@ -545,9 +544,8 @@ class SchemeBase : public Scheme
545544
if ((rods[i]->type != Rod::FREE) && (rods[i]->type != Rod::PINNED))
546545
continue;
547546
auto [pos, vel] = rods[i]->initialize();
548-
auto r = AS_STATE(_r[0])->get(rods[i]);
549-
r.row(0).head<7>() = pos.toVec7();
550-
r.row(0).tail<6>() = vel;
547+
AS_STATE(_r[0])->get(rods[i]).row(0).head<7>() = pos.toVec7();
548+
AS_STATE(_r[0])->get(rods[i]).row(0).tail<6>() = vel;
551549
for (unsigned int j = 0; j < NDERIV; j++)
552550
AS_STATE(_rd[j])->get(rods[i]).setZero();
553551
}
@@ -556,20 +554,17 @@ class SchemeBase : public Scheme
556554
if (points[i]->type != Point::FREE)
557555
continue;
558556
auto [pos, vel] = points[i]->initialize();
559-
auto r = AS_STATE(_r[0])->get(points[i]);
560-
r.row(0) << pos.transpose(), vel.transpose();
561-
r.row(0).head<3>() = pos;
562-
r.row(0).tail<3>() = vel;
557+
AS_STATE(_r[0])->get(points[i]).row(0).head<3>() = pos;
558+
AS_STATE(_r[0])->get(points[i]).row(0).tail<3>() = vel;
563559
for (unsigned int j = 0; j < NDERIV; j++)
564560
AS_STATE(_rd[j])->get(points[i]).setZero();
565561
}
566562

567563
for (unsigned int i = 0; i < lines.size(); i++) {
568564
auto [pos, vel] = lines[i]->initialize();
569-
auto r = AS_STATE(_r[0])->get(lines[i]);
570565
for (unsigned int j = 0; j < pos.size(); j++) {
571-
r.row(j).head<3>() = pos[j];
572-
r.row(j).segment<3>(3) = vel[j];
566+
AS_STATE(_r[0])->get(lines[i]).row(j).head<3>() = pos[j];
567+
AS_STATE(_r[0])->get(lines[i]).row(j).segment<3>(3) = vel[j];
573568
}
574569
for (unsigned int j = 0; j < NDERIV; j++)
575570
AS_STATE(_rd[j])->get(lines[i]).setZero();

0 commit comments

Comments
 (0)