Replace most uses of pointer::offset
with add
and sub
This commit is contained in:
parent
6c943bad02
commit
e4720e1cf2
22 changed files with 57 additions and 57 deletions
|
@ -217,7 +217,7 @@ impl<T> TypedArena<T> {
|
|||
} else {
|
||||
let ptr = self.ptr.get();
|
||||
// Advance the pointer.
|
||||
self.ptr.set(self.ptr.get().offset(1));
|
||||
self.ptr.set(self.ptr.get().add(1));
|
||||
// Write into uninitialized memory.
|
||||
ptr::write(ptr, object);
|
||||
&mut *ptr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue