From 6d68fbf922b6710db95f98ceade947de6f288a8a Mon Sep 17 00:00:00 2001 From: Kishore Nallan Date: Thu, 11 Nov 2021 16:23:52 +0530 Subject: [PATCH] Add consts. --- include/posting.h | 2 +- src/posting.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/posting.h b/include/posting.h index 77a2fac7..c5c3ef66 100644 --- a/include/posting.h +++ b/include/posting.h @@ -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; diff --git a/src/posting.cpp b/src/posting.cpp index 587e6d34..4ec4ab00 100644 --- a/src/posting.cpp +++ b/src/posting.cpp @@ -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);