Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
bd8e0449
Commit
bd8e0449
authored
Apr 12, 2018
by
Pedro Gonnet
Browse files
only swap indices if needed.
parent
3aa1127a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
bd8e0449
...
...
@@ -4615,7 +4615,8 @@ void engine_unskip(struct engine *e) {
(
e
->
policy
&
(
engine_policy_self_gravity
|
engine_policy_external_gravity
)
&&
cell_is_active_gravity
(
c
,
e
)))
{
memswap
(
&
local_cells
[
k
],
&
local_cells
[
num_active_cells
],
sizeof
(
int
));
if
(
num_active_cells
!=
k
)
memswap
(
&
local_cells
[
k
],
&
local_cells
[
num_active_cells
],
sizeof
(
int
));
num_active_cells
+=
1
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment