diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-04-02 14:24:23 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-04-02 14:45:49 +0200 |
commit | 6d7dead4ef35cc166bcbaec3c8817f8d35005a37 (patch) | |
tree | 979c06dcfe63dc9cf4c448c205117243fa7c2a51 /components/gfx/text | |
parent | cd8c03bb4924228d960da4c5a232db2e2d3e2d29 (diff) | |
download | servo-6d7dead4ef35cc166bcbaec3c8817f8d35005a37.tar.gz servo-6d7dead4ef35cc166bcbaec3c8817f8d35005a37.zip |
Use isize for CharIndex.
Diffstat (limited to 'components/gfx/text')
-rw-r--r-- | components/gfx/text/glyph.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index c5f803ca673..8ecffcf142d 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -522,7 +522,7 @@ int_range_index! { #[derive(RustcEncodable)] #[doc = "An index that refers to a character in a text run. This could \ point to the middle of a glyph."] - struct CharIndex(int) + struct CharIndex(isize) } impl<'a> GlyphStore { @@ -540,7 +540,7 @@ impl<'a> GlyphStore { } pub fn char_len(&self) -> CharIndex { - CharIndex(self.entry_buffer.len() as int) + CharIndex(self.entry_buffer.len() as isize) } pub fn is_whitespace(&self) -> bool { @@ -743,8 +743,8 @@ impl<'a> GlyphStore { pub struct GlyphIterator<'a> { store: &'a GlyphStore, char_index: CharIndex, - char_range: EachIndex<int, CharIndex>, - glyph_range: Option<EachIndex<int, CharIndex>>, + char_range: EachIndex<isize, CharIndex>, + glyph_range: Option<EachIndex<isize, CharIndex>>, } impl<'a> GlyphIterator<'a> { @@ -767,7 +767,7 @@ impl<'a> GlyphIterator<'a> { fn next_complex_glyph(&mut self, entry: &GlyphEntry, i: CharIndex) -> Option<(CharIndex, GlyphInfo<'a>)> { let glyphs = self.store.detail_store.get_detailed_glyphs_for_entry(i, entry.glyph_count()); - self.glyph_range = Some(range::each_index(CharIndex(0), CharIndex(glyphs.len() as int))); + self.glyph_range = Some(range::each_index(CharIndex(0), CharIndex(glyphs.len() as isize))); self.next() } } |