Java
Java copied to clipboard
Update BitSwap.java
removed the external getBit() method and replaced it with direct bitwise operations to check and swap bits more efficiently.
- [x] I have read CONTRIBUTING.md.
- [x] This pull request is all my own work -- I have not plagiarized it.
- [x] All filenames are in PascalCase.
- [x] All functions and variable names follow Java naming conventions.
- [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
- [x] All new code is formatted with
clang-format -i --style=file path/to/your/file.java
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.81%. Comparing base (
e499d3b) to head (7aeb2df). Report is 129 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #5927 +/- ##
============================================
+ Coverage 66.80% 66.81% +0.01%
Complexity 4501 4501
============================================
Files 611 611
Lines 16958 16958
Branches 3275 3275
============================================
+ Hits 11328 11330 +2
+ Misses 5182 5181 -1
+ Partials 448 447 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I hope my pull request will be accepted
The original version is much more readable in my opinion, so I wouldn't change it. We chose readability over performance here