diff options
| author | Chandra Pratap <chandrapratap3519@gmail.com> | 2024-08-01 16:29:46 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-01 09:07:29 -0700 |
| commit | b37b71b129d9536aca7bb242ef9d0ab43243f613 (patch) | |
| tree | fdb6a0f0233f85a5a9fa66dacbbdef3c8abe0adc /t/unit-tests/test-lib.h | |
| parent | 2e707447e127c9da3736fe7fa4943640078cc97d (diff) | |
t-reftable-pq: make merged_iter_pqueue_check() callable by reference
merged_iter_pqueue_check() checks the validity of a priority queue
represented by a merged_iter_pqueue struct by asserting the
parent-child relation in the struct's heap. Explicity passing a
struct to this function means a copy of the entire struct is created,
which is inefficient.
Make the function accept a pointer to the struct instead. This is
safe to do since the function doesn't modify the struct in any way.
Make the function parameter 'const' to assert immutability.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/test-lib.h')
0 files changed, 0 insertions, 0 deletions
