Skip to content

Commit 1c722f6

Browse files
Fixed MSVC compatibility
1 parent 3d32113 commit 1c722f6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/gravity/step.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ inline void Step(std::vector<Particle>& p, real dt) {
2121
}
2222

2323
#pragma omp parallel for
24-
for (auto& a : p) {
25-
a.x += a.vx * dt;
26-
a.y += a.vy * dt;
27-
a.z += a.vz * dt;
28-
}
24+
for (int i = 0; i < p.size(); i++) {
25+
p[i].x += p[i].vx * dt;
26+
p[i].y += p[i].vy * dt;
27+
p[i].z += p[i].vz * dt;
28+
}
2929

3030

3131
}
3232

33+

0 commit comments

Comments
 (0)