Do not stress tail recursion elimination and partial condition evaluation too much...
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 6 Oct 2008 07:02:14 +0000 (07:02 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 6 Oct 2008 07:02:14 +0000 (07:02 +0000)
[r22510]

kaps.c

diff --git a/kaps.c b/kaps.c
index 0b8938d..3fcd139 100644 (file)
--- a/kaps.c
+++ b/kaps.c
@@ -19,7 +19,9 @@ pbqp_edge *get_edge(pbqp *pbqp, unsigned src_index, unsigned tgt_index)
        int len;
 
        if (tgt_index < src_index) {
-               return get_edge(pbqp, tgt_index, src_index);
+               unsigned tmp = src_index;
+               src_index    = tgt_index;
+               tgt_index    = tmp;
        }
 
        pbqp_node *src_node = get_node(pbqp, src_index);