Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c_src/bloom_filter.hpp:74: bad operator = ? #16

Open
dcb314 opened this issue Jun 14, 2018 · 0 comments
Open

c_src/bloom_filter.hpp:74: bad operator = ? #16

dcb314 opened this issue Jun 14, 2018 · 0 comments

Comments

@dcb314
Copy link

dcb314 commented Jun 14, 2018

c_src/bloom_filter.hpp:74]: (warning) 'operator=' should check for assignment to self to avoid problems with dynamic memory.

Source code is

bloom_filter& operator = (const bloom_filter& filter)
{
salt_count_ = filter.salt_count_;
table_size_ = filter.table_size_;

There should be a check first for this != &filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant