From: Steinar H. Gunderson Date: Sat, 13 Feb 2021 00:41:04 +0000 (+0100) Subject: Take an assert off the hot path. X-Git-Tag: 1.1.4~3 X-Git-Url: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=fe6f818642f912d3d3c3634f6346dbdfd314c433 Take an assert off the hot path. Seemingly, Meson doesn't include -DNDEBUG by default, and this assert is pretty hot, to take it out to be sure. --- diff --git a/database-builder.cpp b/database-builder.cpp index 76479aa..75b96f8 100644 --- a/database-builder.cpp +++ b/database-builder.cpp @@ -64,8 +64,6 @@ void PostingListBuilder::add_docid(uint32_t docid) return; } - assert(num_docids != 0); - pending_deltas.push_back(docid - last_docid - 1); last_docid = docid; if (pending_deltas.size() == 128) {