Remove unused MultiByteChar.sum field from codemap
This commit is contained in:
parent
7c72fd89f1
commit
e621e68c60
1 changed files with 0 additions and 10 deletions
|
@ -193,9 +193,6 @@ pub struct MultiByteChar {
|
||||||
pos: BytePos,
|
pos: BytePos,
|
||||||
/// The number of bytes, >=2
|
/// The number of bytes, >=2
|
||||||
bytes: uint,
|
bytes: uint,
|
||||||
/// The complete number of 'extra' bytes through this character in the
|
|
||||||
/// FileMap
|
|
||||||
sum: uint
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single source in the CodeMap
|
/// A single source in the CodeMap
|
||||||
|
@ -233,16 +230,9 @@ pub impl FileMap {
|
||||||
|
|
||||||
pub fn record_multibyte_char(&self, pos: BytePos, bytes: uint) {
|
pub fn record_multibyte_char(&self, pos: BytePos, bytes: uint) {
|
||||||
assert bytes >=2 && bytes <= 4;
|
assert bytes >=2 && bytes <= 4;
|
||||||
let sum = if self.multibyte_chars.len() > 0 {
|
|
||||||
self.multibyte_chars.last().sum
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
};
|
|
||||||
let sum = sum + bytes;
|
|
||||||
let mbc = MultiByteChar {
|
let mbc = MultiByteChar {
|
||||||
pos: pos,
|
pos: pos,
|
||||||
bytes: bytes,
|
bytes: bytes,
|
||||||
sum: sum
|
|
||||||
};
|
};
|
||||||
self.multibyte_chars.push(mbc);
|
self.multibyte_chars.push(mbc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue