Make set_char_is_space mutate self in place

This commit is contained in:
Matt Brubeck 2015-09-30 09:38:12 -07:00
parent e663005ce2
commit 4174c918ad

View file

@ -129,8 +129,8 @@ impl GlyphEntry {
} }
#[inline(always)] #[inline(always)]
fn set_char_is_space(&self) -> GlyphEntry { fn set_char_is_space(&mut self) {
GlyphEntry::new(self.value | FLAG_CHAR_IS_SPACE) self.value |= FLAG_CHAR_IS_SPACE;
} }
fn glyph_count(&self) -> u16 { fn glyph_count(&self) -> u16 {
@ -487,7 +487,7 @@ impl<'a> GlyphStore {
}; };
if character == ' ' { if character == ' ' {
entry = entry.set_char_is_space() entry.set_char_is_space()
} }
self.entry_buffer[i.to_usize()] = entry; self.entry_buffer[i.to_usize()] = entry;