]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/keyboard.c
faster, less bits :)
[qmk_firmware.git] / tmk_core / common / keyboard.c
index fa17ffca2581f1723ccfb1b22e870ab14e950dbe..20b867285e1a0e59aae359b1708d7fe31cc68e16 100644 (file)
@@ -76,15 +76,8 @@ static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){
 
 static inline bool countones(matrix_row_t row)
 {
-    int count = 0;
-    while (row > 0){
-        count += 1;
-        row &= row-1;
-    }
-    if (count > 1){
-        return true;
-    }
-    return false;
+    row &= row-1;
+    return row;
 }
 
 static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)