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

fix shadow warning in gcc (#1) #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

museghost
Copy link

No description provided.

@Tessil
Copy link
Owner

Tessil commented Jun 30, 2021

Hi,

Thank you for your contribution. Would it be possible to change __hash to something like hash_ as any name starting with two underscores are reserved? Thanks.

@museghost
Copy link
Author

@Tessil At first, I appreciate you to developing such a wonderful hashmap in c++ world. This library helps me a lot.
This commit contains the suffix hash_ what you said before.
Could you please check it and merge them, if possible ?

@@ -1045,14 +1045,14 @@ class hopscotch_hash : private Hash, private KeyEqual, private GrowthPolicy {
typename U::value_type& operator[](K&& key) {
using T = typename U::value_type;

const std::size_t hash = hash_key(key);
const std::size_t ibucket_for_hash = bucket_for_hash(hash);
const std::size_t __m_hash = hash_key(key);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why __m_hash here? Double underscores are reserved and I don't see the reason for the m_ too.

Comment valid for the other __m_hash occurrences in the PR.

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

Successfully merging this pull request may close these issues.

2 participants