From: Florian Forster Date: Sat, 10 May 2008 06:32:20 +0000 (+0200) Subject: sn-apply: Use `sn_stage_sort' rather than the own function. X-Git-Tag: v1.0.0~96 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=8b2cf27d1c393ea8119305799b1c5a4473e77718;p=sort-networks.git sn-apply: Use `sn_stage_sort' rather than the own function. --- diff --git a/src/sn-apply.c b/src/sn-apply.c index 0f99ab2..3694f03 100644 --- a/src/sn-apply.c +++ b/src/sn-apply.c @@ -142,23 +142,9 @@ static int show_sort (int *values) for (i = 0; i < stages_num; i++) { sn_stage_t *s; - int j; s = SN_NETWORK_STAGE_GET (network, i); - - for (j = 0; j < SN_STAGE_COMP_NUM (s); j++) - { - sn_comparator_t *c; - - c = SN_STAGE_COMP_GET (s, j); - - if (values[c->min] > values[c->max]) - { - int temp = values[c->min]; - values[c->min] = values[c->max]; - values[c->max] = temp; - } - } /* for (comparators) */ + sn_stage_sort (s, values); show_values (SN_NETWORK_INPUT_NUM (network), values); } /* for (stages) */