]> git.notmuchmail.org Git - notmuch/commit - lib/add-message.cc
lib: isolate n_d_add_message and helper functions into own file
authorDavid Bremner <david@tethera.net>
Sun, 4 Jun 2017 12:32:24 +0000 (09:32 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 2 Aug 2017 01:17:47 +0000 (21:17 -0400)
commit4034a7cec75b785c9f935186a4daad7c325df56c
treeaf829cc8130451562a691f3de22dbb26e4cc33fc
parent4a101ec7aabef163ffbdafe1b0a732bb23b3b0bc
lib: isolate n_d_add_message and helper functions into own file

'database.cc' is becoming a monster, and it's hard to follow what the
various static functions are used for. It turns out that about 1/3 of
this file notmuch_database_add_message and helper functions not used
by any other function. This commit isolates this code into it's own
file.

Some side effects of this refactoring:

- find_doc_ids becomes the non-static (but still private)
  _notmuch_database_find_doc_ids
- a few instances of 'string' have 'std::' prepended, avoiding the
  need for 'using namespace std;' in the new file.
lib/Makefile.local
lib/add-message.cc [new file with mode: 0644]
lib/database-private.h
lib/database.cc