]> git.sesse.net Git - plocate/commitdiff
Take an assert off the hot path.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 13 Feb 2021 00:41:04 +0000 (01:41 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 13 Feb 2021 00:41:04 +0000 (01:41 +0100)
Seemingly, Meson doesn't include -DNDEBUG by default, and this assert
is pretty hot, to take it out to be sure.

database-builder.cpp

index 76479aa3dde8673e5a5f389f244d8895f3370b31..75b96f8c02a6c4108f2b0497e2aa5881167db80a 100644 (file)
@@ -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) {