Skip to content

Commit

Permalink
Remove unused parameters in afs function
Browse files Browse the repository at this point in the history
  • Loading branch information
tforest committed Oct 31, 2024
1 parent b8f4ba5 commit c9f6c06
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions c/tskit/trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,8 +1233,8 @@ tsk_treeseq_check_windows(const tsk_treeseq_t *self, tsk_size_t num_windows,
}

static int
tsk_treeseq_check_time_windows(const tsk_treeseq_t *self, tsk_size_t num_windows,
const double *windows, tsk_flags_t options)
tsk_treeseq_check_time_windows(tsk_size_t num_windows,

Check warning on line 1236 in c/tskit/trees.c

View check run for this annotation

Codecov / codecov/patch

c/tskit/trees.c#L1236

Added line #L1236 was not covered by tests
const double *windows)
{
int ret = TSK_ERR_BAD_WINDOWS;

Check warning on line 1239 in c/tskit/trees.c

View check run for this annotation

Codecov / codecov/patch

c/tskit/trees.c#L1239

Added line #L1239 was not covered by tests
tsk_size_t j;
Expand Down Expand Up @@ -3528,9 +3528,9 @@ tsk_treeseq_site_allele_frequency_spectrum(const tsk_treeseq_t *self,

static int TSK_WARN_UNUSED
tsk_treeseq_update_branch_afs(const tsk_treeseq_t *self, tsk_id_t u, double right,
const double *restrict branch_length, double *restrict last_update,
double *restrict last_update,
const double *restrict time, tsk_id_t *restrict parent, const double *time_windows,
const double *counts, tsk_size_t num_sample_sets, tsk_size_t num_windows,
const double *counts, tsk_size_t num_sample_sets,
tsk_size_t num_time_windows, tsk_size_t window_index, tsk_size_t time_window_index,
const tsk_size_t *result_dims, tsk_flags_t options, double *result)
{
Expand Down Expand Up @@ -3623,17 +3623,17 @@ tsk_treeseq_branch_allele_frequency_spectrum(const tsk_treeseq_t *self,
tk++;
u = edge_child[h];
v = edge_parent[h];
ret = tsk_treeseq_update_branch_afs(self, u, t_left, branch_length,
ret = tsk_treeseq_update_branch_afs(self, u, t_left,
last_update, node_time, parent, time_windows, counts, num_sample_sets,
num_windows, num_time_windows, window_index, time_window_index,
num_time_windows, window_index, time_window_index,
result_dims, options, result);
if (ret != 0) {
goto out;
}
while (v != TSK_NULL) {
ret = tsk_treeseq_update_branch_afs(self, v, t_left, branch_length,
ret = tsk_treeseq_update_branch_afs(self, v, t_left,
last_update, node_time, parent, time_windows, counts,
num_sample_sets, num_windows, num_time_windows, window_index,
num_sample_sets, num_time_windows, window_index,
time_window_index, result_dims, options, result);
if (ret != 0) {
goto out;
Expand All @@ -3653,9 +3653,9 @@ tsk_treeseq_branch_allele_frequency_spectrum(const tsk_treeseq_t *self,
parent[u] = v;
branch_length[u] = node_time[v] - node_time[u];
while (v != TSK_NULL) {
ret = tsk_treeseq_update_branch_afs(self, v, t_left, branch_length,
ret = tsk_treeseq_update_branch_afs(self, v, t_left,
last_update, node_time, parent, time_windows, counts,
num_sample_sets, num_windows, num_time_windows, window_index,
num_sample_sets, num_time_windows, window_index,
time_window_index, result_dims, options, result);
if (ret != 0) {
goto out;
Expand All @@ -3678,9 +3678,9 @@ tsk_treeseq_branch_allele_frequency_spectrum(const tsk_treeseq_t *self,
/* Flush the contributions of all nodes to the current window */
for (u = 0; u < (tsk_id_t) num_nodes; u++) {
tsk_bug_assert(last_update[u] < w_right);
ret = tsk_treeseq_update_branch_afs(self, u, w_right, branch_length,
ret = tsk_treeseq_update_branch_afs(self, u, w_right,
last_update, node_time, parent, time_windows, counts,
num_sample_sets, num_windows, num_time_windows, window_index,
num_sample_sets, num_time_windows, window_index,
time_window_index, result_dims, options, result);
if (ret != 0) {
goto out;
Expand Down Expand Up @@ -3755,7 +3755,7 @@ tsk_treeseq_allele_frequency_spectrum(const tsk_treeseq_t *self,
time_windows = default_time_windows;
} else {
ret = tsk_treeseq_check_time_windows(

Check warning on line 3757 in c/tskit/trees.c

View check run for this annotation

Codecov / codecov/patch

c/tskit/trees.c#L3757

Added line #L3757 was not covered by tests
self, num_time_windows, time_windows, TSK_REQUIRE_FULL_SPAN);
num_time_windows, time_windows);
if (ret != 0) {
goto out;

Check warning on line 3760 in c/tskit/trees.c

View check run for this annotation

Codecov / codecov/patch

c/tskit/trees.c#L3760

Added line #L3760 was not covered by tests
}
Expand Down

0 comments on commit c9f6c06

Please sign in to comment.