mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-09 22:30:58 +08:00
Keep clang-tidy happy [skip ci]
This commit is contained in:
@@ -178,7 +178,12 @@ NeedsUpdated(HnswVacuumState * vacuumstate, HnswElement element)
|
|||||||
/* Also update if layer 0 is not full */
|
/* Also update if layer 0 is not full */
|
||||||
/* This could indicate too many candidates being deleted during insert */
|
/* This could indicate too many candidates being deleted during insert */
|
||||||
if (!needsUpdated)
|
if (!needsUpdated)
|
||||||
|
{
|
||||||
|
/* Keep clang-tidy happy */
|
||||||
|
Assert(ntup->count > 0);
|
||||||
|
|
||||||
needsUpdated = !ItemPointerIsValid(&ntup->indextids[ntup->count - 1]);
|
needsUpdated = !ItemPointerIsValid(&ntup->indextids[ntup->count - 1]);
|
||||||
|
}
|
||||||
|
|
||||||
UnlockReleaseBuffer(buf);
|
UnlockReleaseBuffer(buf);
|
||||||
|
|
||||||
@@ -528,8 +533,9 @@ MarkDeleted(HnswVacuumState * vacuumstate)
|
|||||||
ntup = (HnswNeighborTuple) PageGetItem(npage, PageGetItemId(npage, neighborOffno));
|
ntup = (HnswNeighborTuple) PageGetItem(npage, PageGetItemId(npage, neighborOffno));
|
||||||
|
|
||||||
/* Overwrite element */
|
/* Overwrite element */
|
||||||
|
/* Use memset instead of MemSet to keep clang-tidy happy */
|
||||||
etup->deleted = 1;
|
etup->deleted = 1;
|
||||||
MemSet(&etup->data, 0, VARSIZE_ANY(&etup->data));
|
memset(&etup->data, 0, VARSIZE_ANY(&etup->data));
|
||||||
|
|
||||||
/* Overwrite neighbors */
|
/* Overwrite neighbors */
|
||||||
for (int i = 0; i < ntup->count; i++)
|
for (int i = 0; i < ntup->count; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user