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

Rename countOnes method #76

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Rename countOnes method #76

merged 1 commit into from
Aug 28, 2023

Conversation

dmeybohm
Copy link
Owner

  • Rename BoardCode::countOnes() to numberOfSetBits()
  • Use std::bitset::count() method instead of converting to a string to count the number of true values in the bitset
  • Add additional assertion in test to check all the bits in the board code are not set.

- Rename `BoardCode::countOnes()` to `numberOfSetBits()`
- Use `std::bitset::count()` method instead of converting to a string
to count the number of true values in the bitset
- Add additional assertion in test to check all the bits in the
board code are not set.
@dmeybohm dmeybohm merged commit 36afc82 into main Aug 28, 2023
1 check passed
@dmeybohm dmeybohm deleted the rename-count-ones branch August 28, 2023 04:45
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.

1 participant