diff options
author | David Robillard <d@drobilla.net> | 2014-07-15 19:48:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-07-15 19:48:35 +0000 |
commit | 46e5b520df7f08edb96fb29e3775bccf3205d8f7 (patch) | |
tree | 1dd78e4de36a8229f6fc74c71ebbd14111915564 /src | |
parent | 996fa3452a544cb4750e00d7d1f52c3a48d439f9 (diff) | |
download | sord-46e5b520df7f08edb96fb29e3775bccf3205d8f7.tar.gz sord-46e5b520df7f08edb96fb29e3775bccf3205d8f7.tar.bz2 sord-46e5b520df7f08edb96fb29e3775bccf3205d8f7.zip |
Fix iteration over an entire graph (* * * graph).
git-svn-id: http://svn.drobilla.net/sord/trunk@296 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r-- | src/sord.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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) |