diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/sord.c | 16 |
2 files changed, 12 insertions, 7 deletions
@@ -1,9 +1,10 @@ sord (0.12.1) unstable; + * Fix iteration over an entire graph (* * * graph) * sordmm.hpp: Remove unused members * Update to waf 1.7.11 - -- David Robillard <d@drobilla.net> Tue, 20 Aug 2013 11:33:58 -0400 + -- David Robillard <d@drobilla.net> Tue, 15 Jul 2014 15:16:07 -0400 sord (0.12.0) stable; @@ -570,8 +570,14 @@ sord_best_index(SordModel* sord, *n_prefix = 0; switch (sig) { case 0x000: - *mode = ALL; - return graph_search ? DEFAULT_GRAPH_ORDER : DEFAULT_ORDER; + if (graph_search) { + *mode = RANGE; + *n_prefix = 1; + return DEFAULT_GRAPH_ORDER; + } else { + *mode = ALL; + return DEFAULT_ORDER; + } case 0x111: *mode = SINGLE; return graph_search ? DEFAULT_GRAPH_ORDER : DEFAULT_ORDER; @@ -809,10 +815,8 @@ sord_find(SordModel* sord, const SordQuad pat) int n_prefix; const SordOrder index_order = sord_best_index(sord, pat, &mode, &n_prefix); - SORD_FIND_LOG("Find " TUP_FMT " index=%s mode=%d" - " n_prefix=%d ordering=%d%d%d%d\n", - TUP_FMT_ARGS(pat), order_names[index_order], mode, n_prefix, - ordering[0], ordering[1], ordering[2], ordering[3]); + SORD_FIND_LOG("Find " TUP_FMT " index=%s mode=%d n_prefix=%d\n", + TUP_FMT_ARGS(pat), order_names[index_order], mode, n_prefix); if (pat[0] && pat[1] && pat[2] && pat[3]) mode = SINGLE; // No duplicate quads (Sord is a set) |