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

Update shared_func.c #10

Merged
merged 1 commit into from
Dec 17, 2016
Merged

Update shared_func.c #10

merged 1 commit into from
Dec 17, 2016

Conversation

hanyunqi
Copy link
Contributor

@hanyunqi hanyunqi commented Dec 8, 2016

update is_power2:

inline bool is_power2(const int64_t n)
{
    return ((n != 0) && !(n & (n - 1)));	
}

reference

update is_power2: return ((n != 0) && !(n & (n - 1)));
@happyfish100 happyfish100 merged commit 182ad4b into happyfish100:master Dec 17, 2016
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