Skip to content

Commit b1e9c27

Browse files
bors[bot]Amanieu
andcommitted
Merge #32
32: Fix non-SSE variant of convert_special_to_empty_and_full_to_deleted r=Amanieu a=Amanieu As a bonus, it is now faster too! Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2 parents 0d64c37 + 92b431f commit b1e9c27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/raw/generic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ impl Group {
122122
/// - `FULL => DELETED`
123123
#[inline]
124124
pub fn convert_special_to_empty_and_full_to_deleted(&self) -> Group {
125-
Group(((self.0 & repeat(0x80)) >> 7) * 0xff)
125+
let special = self.0 & repeat(0x80);
126+
Group(special + (!special >> 7))
126127
}
127128
}

0 commit comments

Comments
 (0)