summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-27 20:05:11 +0000
committerDavid Robillard <d@drobilla.net>2011-01-27 20:05:11 +0000
commitda6c78a6756edd15ffac7a35d211ca8a283b2b7c (patch)
tree38e1b9b369e68499a004f84219301a43a2f765f1 /src
parentb488ad4e12446e5e01177a3ff859cf4cba9213dd (diff)
downloadsord-da6c78a6756edd15ffac7a35d211ca8a283b2b7c.tar.gz
sord-da6c78a6756edd15ffac7a35d211ca8a283b2b7c.tar.bz2
sord-da6c78a6756edd15ffac7a35d211ca8a283b2b7c.zip
Remove pointless sord_new_btree.
git-svn-id: http://svn.drobilla.net/sord/trunk@5 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r--src/sord.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/sord.c b/src/sord.c
index 3f4f3b1..75f2c58 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -545,12 +545,6 @@ sord_best_index(Sord sord, const SordTuple pat, SearchMode* mode, int* n_prefix)
}
}
-static GSequence*
-sord_new_btree()
-{
- return g_sequence_new(NULL);
-}
-
Sord
sord_new()
{
@@ -595,12 +589,12 @@ sord_set_option(Sord sord, const char* key, const char* value,
const bool value_is_true = !strcmp(value, "true") || !strcmp(value, "1") || !strcmp(value, "yes");
if (!strcmp(option, "index-all")) {
for (int i = 0; i < NUM_ORDERS; ++i) {
- sord->indices[i] = sord_new_btree();
+ sord->indices[i] = g_sequence_new(NULL);
}
} else if (!strncmp(option, "index-", 6) && value_is_true) {
for (int i = 0; i < NUM_ORDERS; ++i) {
if (!strcmp(option + 6, order_names[i])) {
- sord->indices[i] = sord_new_btree();
+ sord->indices[i] = g_sequence_new(NULL);
return;
}
}
@@ -624,14 +618,14 @@ sord_open(Sord sord)
if (no_indices) {
// Use default indexing, avoids O(n) in all cases
- sord->indices[SPO] = sord_new_btree();
- sord->indices[OPS] = sord_new_btree();
- sord->indices[PSO] = sord_new_btree();
- sord->indices[GSPO] = sord_new_btree(); // XXX: default? do on demand?
+ sord->indices[SPO] = g_sequence_new(NULL);
+ sord->indices[OPS] = g_sequence_new(NULL);
+ sord->indices[PSO] = g_sequence_new(NULL);
+ sord->indices[GSPO] = g_sequence_new(NULL); // XXX: default? do on demand?
}
if (!sord->indices[DEFAULT_ORDER])
- sord->indices[DEFAULT_ORDER] = sord_new_btree();
+ sord->indices[DEFAULT_ORDER] = g_sequence_new(NULL);
return true;
}