Format code according to conventions (#16322)

This commit is contained in:
QMK Bot authored and GitHub committed 2022-02-12 18:29:31 +00:00
1 parent afcdd7079c
commit 63646e8906
345 files changed
+4916 -3229

No files matched your search

+6 -3
View File
@@ -20,7 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// bit population - return number of on-bit
__attribute__((noinline)) uint8_t bitpop(uint8_t bits) {
uint8_t c;
for (c = 0; bits; c++) bits &= bits - 1;
for (c = 0; bits; c++)
bits &= bits - 1;
return c;
/*
const uint8_t bit_count[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 };
@@ -30,13 +31,15 @@ __attribute__((noinline)) uint8_t bitpop(uint8_t bits) {
uint8_t bitpop16(uint16_t bits) {
uint8_t c;
for (c = 0; bits; c++) bits &= bits - 1;
for (c = 0; bits; c++)
bits &= bits - 1;
return c;
}
uint8_t bitpop32(uint32_t bits) {
uint8_t c;
for (c = 0; bits; c++) bits &= bits - 1;
for (c = 0; bits; c++)
bits &= bits - 1;
return c;
}