kakao / n2

TOROS N2 - lightweight approximate Nearest Neighbor library which runs fast even with large datasets
Apache License 2.0
567 stars 71 forks source link

Protect classes against self-assignment #10

Closed elfring closed 3 years ago

elfring commented 6 years ago

The class “Hnsw” contains a custom copy assignment operator. I wonder why a check against self-assignment was omitted.

corona10 commented 6 years ago

@elfring Yes, you are right. That's my fault. Can you send the patch to solve this issue?

elfring commented 6 years ago

Are you quicker than me adding another if statement (if it is really needed) in the affected function implementation?

corona10 commented 6 years ago

@elfring I can patch this right now, but if you want to patch, I can wait for your patch. :)

elfring commented 6 years ago

You do not need to wait on me for this adjustment.

gony-noreply commented 3 years ago

Patched in N2 version 0.1.6