Add consts.

This commit is contained in:
Kishore Nallan 2021-11-11 16:23:52 +05:30
parent 9331f996eb
commit 6d68fbf922
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ struct compact_posting_list_t {
uint32_t id_offsets[];
static compact_posting_list_t* create(uint32_t num_ids, const uint32_t* ids, const uint32_t* offset_index,
uint32_t num_offsets, uint32_t* offsets);
uint32_t num_offsets, const uint32_t* offsets);
[[nodiscard]] posting_list_t* to_full_posting_list() const;

View File

@ -135,7 +135,7 @@ void compact_posting_list_t::erase(const uint32_t id) {
}
compact_posting_list_t* compact_posting_list_t::create(uint32_t num_ids, const uint32_t* ids, const uint32_t* offset_index,
uint32_t num_offsets, uint32_t* offsets) {
uint32_t num_offsets, const uint32_t* offsets) {
// format: num_offsets, offset1,..,offsetn, id1 | num_offsets, offset1,..,offsetn, id2
size_t length_required = num_offsets + (2 * num_ids);