diff options
| author | John Hodge <tpg@mutabah.net> | 2018-09-09 22:19:40 +0800 | 
|---|---|---|
| committer | John Hodge <tpg@mutabah.net> | 2018-09-09 22:20:32 +0800 | 
| commit | d85ac84278fa0322f1df0b16a45a1cdde83cba57 (patch) | |
| tree | 66bad02a3c0bb9144e629d2ac8294b58430ff4ef /tools/standalone_miri/value.cpp | |
| parent | dd4e3c887fa2eef2db6fa2795d4283636a1cc26e (diff) | |
| download | mrust-d85ac84278fa0322f1df0b16a45a1cdde83cba57.tar.gz | |
Msvc compile fixes
Diffstat (limited to 'tools/standalone_miri/value.cpp')
| -rw-r--r-- | tools/standalone_miri/value.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/tools/standalone_miri/value.cpp b/tools/standalone_miri/value.cpp index cf378077..849d3a64 100644 --- a/tools/standalone_miri/value.cpp +++ b/tools/standalone_miri/value.cpp @@ -239,7 +239,7 @@ void* ValueCommonRead::read_pointer_unsafe(size_t rd_ofs, size_t req_valid, size              // TODO: Have an idea of mutability and available size from FFI              out_size = f.size - ofs;              out_is_mut = false; -            return reloc.ffi().ptr_value + ofs; +            return reinterpret_cast<char*>(reloc.ffi().ptr_value) + ofs;              }          }          throw ""; @@ -607,22 +607,22 @@ Value Value::new_pointer(::HIR::TypeRef ty, uint64_t v, RelocationPtr r) {      return rv;  }  Value Value::new_usize(uint64_t v) { -    Value   rv( ::HIR::TypeRef(RawType::USize) ); +    auto rv = Value( ::HIR::TypeRef(RawType::USize) );      rv.write_usize(0, v);      return rv;  }  Value Value::new_isize(int64_t v) { -    Value   rv( ::HIR::TypeRef(RawType::ISize) ); +    auto rv = Value( ::HIR::TypeRef(RawType::ISize) );      rv.write_isize(0, v);      return rv;  }  Value Value::new_u32(uint32_t v) { -    Value   rv( ::HIR::TypeRef(RawType::U32) ); +    auto rv = Value( ::HIR::TypeRef(RawType::U32) );      rv.write_u32(0, v);      return rv;  }  Value Value::new_i32(int32_t v) { -    Value   rv( ::HIR::TypeRef(RawType::I32) ); +    auto rv = Value( ::HIR::TypeRef(RawType::I32) );      rv.write_i32(0, v);      return rv;  } | 
