* mu-query: minor updates

This commit is contained in:
djcb
2012-12-20 23:37:04 +02:00
parent e883ef5a07
commit d6332f3cc8

View File

@ -412,18 +412,19 @@ mu_query_run (MuQuery *self, const char* searchexpr, MuMsgFieldId sortfieldid,
NULL);
try {
MuMsgIter *iter;
Xapian::Enquire enq (get_enquire(self, searchexpr, sortfieldid, flags,
err));
Xapian::Enquire enq (get_enquire(self, searchexpr, sortfieldid,
flags, err));
/* get the 'real' maxnum if it was specified as < 0 */
maxnum <= 0 ? self->db().get_doccount() : maxnum;
maxnum = maxnum <= 0 ? self->db().get_doccount() : maxnum;
iter = mu_msg_iter_new (
reinterpret_cast<XapianEnquire*>(&enq),
maxnum,
/* in we were *not* using threads, no further sorting
* is needed since Xapian already sorted */
(flags & MU_QUERY_FLAG_THREADS) ? sortfieldid : MU_MSG_FIELD_ID_NONE,
(flags & MU_QUERY_FLAG_THREADS)
? sortfieldid : MU_MSG_FIELD_ID_NONE,
msg_iter_flags (flags),
err);