interpret: simplify pointer arithmetic logic
This commit is contained in:
parent
de78cb56b2
commit
5d5c97aad7
27 changed files with 73 additions and 187 deletions
|
@ -309,11 +309,7 @@ fn report_bin_hex_error(
|
|||
) {
|
||||
let (t, actually) = match ty {
|
||||
attr::IntType::SignedInt(t) => {
|
||||
let actually = if negative {
|
||||
-(size.sign_extend(val) as i128)
|
||||
} else {
|
||||
size.sign_extend(val) as i128
|
||||
};
|
||||
let actually = if negative { -(size.sign_extend(val)) } else { size.sign_extend(val) };
|
||||
(t.name_str(), actually.to_string())
|
||||
}
|
||||
attr::IntType::UnsignedInt(t) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue