aboutsummaryrefslogtreecommitdiffhomepage
path: root/message.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-25 00:25:59 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-25 00:31:20 -0700
commit1c2bac747e4da6cb8383aa3ad5e377af4cce603f (patch)
treea06db69dff18ed61d93d74ec1f4a6e2b4c652fdd /message.cc
parent5941b91a5eee61ae7d0f6c8f750df9187780e911 (diff)
Drop the storage of thread ID(s) in a value.
Now that we are iterating over the thread terms instead, we can drop this redundant storage (which should shrink our database a tiny bit).
Diffstat (limited to 'message.cc')
-rw-r--r--message.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/message.cc b/message.cc
index 1d9dfeda..80832cae 100644
--- a/message.cc
+++ b/message.cc
@@ -292,26 +292,7 @@ void
_notmuch_message_add_thread_id (notmuch_message_t *message,
const char *thread_id)
{
- std::string id_str;
-
_notmuch_message_add_term (message, "thread", thread_id);
-
- id_str = message->doc.get_value (NOTMUCH_VALUE_THREAD);
-
- if (id_str.empty ()) {
- message->doc.add_value (NOTMUCH_VALUE_THREAD, thread_id);
- } else {
- size_t pos;
-
- /* Think about using a hash here if there's any performance
- * problem. */
- pos = id_str.find (thread_id);
- if (pos == std::string::npos) {
- id_str.append (",");
- id_str.append (thread_id);
- message->doc.add_value (NOTMUCH_VALUE_THREAD, id_str);
- }
- }
}
static void
@@ -351,7 +332,6 @@ _notmuch_message_ensure_thread_id (notmuch_message_t *message)
thread_id_generate (&thread_id);
_notmuch_message_add_term (message, "thread", thread_id.str);
- message->doc.add_value (NOTMUCH_VALUE_THREAD, thread_id.str);
}
/* Synchronize changes made to message->doc out into the database. */