Skip to content

Commit 4f8ab57

Browse files
committed
Simplified CountElement [skip ci]
1 parent a158061 commit 4f8ab57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hnswutils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ AddToVisited(char *base, visited_hash * v, HnswElementPtr elementPtr, Relation i
725725
* Count element towards ef
726726
*/
727727
static inline bool
728-
CountElement(char *base, HnswElement skipElement, HnswElement e)
728+
CountElement(HnswElement skipElement, HnswElement e)
729729
{
730730
if (skipElement == NULL)
731731
return true;
@@ -851,7 +851,7 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
851851
* would be ideal to do this for inserts as well, but this could
852852
* affect insert performance.
853853
*/
854-
if (CountElement(base, skipElement, HnswPtrAccess(base, hc->element)))
854+
if (CountElement(skipElement, HnswPtrAccess(base, hc->element)))
855855
wlen++;
856856
}
857857

@@ -923,7 +923,7 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
923923
* It would be ideal to do this for inserts as well, but this
924924
* could affect insert performance.
925925
*/
926-
if (CountElement(base, skipElement, eElement))
926+
if (CountElement(skipElement, eElement))
927927
{
928928
wlen++;
929929

0 commit comments

Comments
 (0)