Skip to content

Commit

Permalink
Resolve initialisation order warning
Browse files Browse the repository at this point in the history
GNU compilers no longer warn with -Wall or -Wreorder that initialisation
order does not match declaration order in HierarchicalHNSW
  • Loading branch information
stephematician committed Sep 27, 2023
1 parent 359b2ba commit 3de1d69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hnswlib/hnswalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {
size_t ef_construction = 200,
size_t random_seed = 100,
bool allow_replace_deleted = false)
: link_list_locks_(max_elements),
label_op_locks_(MAX_LABEL_OPERATION_LOCKS),
: label_op_locks_(MAX_LABEL_OPERATION_LOCKS),
link_list_locks_(max_elements),
element_levels_(max_elements),
allow_replace_deleted_(allow_replace_deleted) {
max_elements_ = max_elements;
Expand Down

0 comments on commit 3de1d69

Please sign in to comment.