Commit 629bb48c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

clang-compatibility

parent 5a69314f
......@@ -75,7 +75,7 @@ void printgParticle(struct gpart *parts, long long int id, int N) {
"## gParticle[%d]: id=%lld, x=[%.16e,%.16e,%.16e], "
"v=[%.3e,%.3e,%.3e], a=[%.3e,%.3e,%.3e], m=%.3e, t_begin=%.3e, "
"t_end=%.3e\n",
i, (parts[i].id < 0) ? -parts[i].id : parts[i].part->id,
i, parts[i].part->id,
parts[i].x[0], parts[i].x[1], parts[i].x[2], parts[i].v[0],
parts[i].v[1], parts[i].v[2], parts[i].a[0], parts[i].a[1],
parts[i].a[2], parts[i].mass, parts[i].t_begin, parts[i].t_end);
......
......@@ -582,7 +582,7 @@ void runner_dosub_grav(struct runner *r, struct cell *ci, struct cell *cj,
/* Get the opening angle theta. */
float dx[3], theta;
for (k = 0; k < 3; k++) {
dx[k] = fabsf(ci->loc[k] - cj->loc[k]);
dx[k] = fabs(ci->loc[k] - cj->loc[k]);
if (periodic && dx[k] > 0.5 * s->dim[k]) dx[k] = -dx[k] + s->dim[k];
if (dx[k] > 0.0f) dx[k] -= ci->h[k];
}
......
......@@ -598,7 +598,7 @@ void scheduler_splittasks(struct scheduler *s) {
/* Get the opening angle theta. */
float dx[3], theta;
for (k = 0; k < 3; k++) {
dx[k] = fabsf(ci->loc[k] - cj->loc[k]);
dx[k] = fabs(ci->loc[k] - cj->loc[k]);
if (s->space->periodic && dx[k] > 0.5 * s->space->dim[k])
dx[k] = -dx[k] + s->space->dim[k];
if (dx[k] > 0.0f) dx[k] -= ci->h[k];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment