Skip to content

reordering warning with g++ in HierarchicalNSW #438

@jlmelville

Description

@jlmelville

The initializer in the third constructor for HierarchicalNSW has label_op_locks_ and link_list_locks_(max_elements) initialized in a different order to their declaration (on line 42 and 39, respectively):

: link_list_locks_(max_elements),
label_op_locks_(MAX_LABEL_OPERATION_LOCKS),

This causes a -Wreorder warning to be emitted by g++. Not a big deal admittedly, but I was hoping to finally get the R bindings up to date, and a compiler warning will be grounds for rejection by CRAN (not anyone's problem but mine).

Happy to provide a PR, although the fix is as trivial as swapping the position of the two initializers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions