Update deprecated addr_of calls to the newer to_unsafe_ptr

This commit is contained in:
Brendan Zabarauskas 2012-11-22 10:38:39 +10:00
parent bb63eb39b5
commit 161860c7dc
2 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
use core::cast::transmute; use core::cast::transmute;
use core::cmp::Eq; use core::cmp::Eq;
use core::ptr::{addr_of, to_unsafe_ptr}; use core::ptr::to_unsafe_ptr;
use core::vec::raw::buf_as_slice; use core::vec::raw::buf_as_slice;
use std::cmp::FuzzyEq; use std::cmp::FuzzyEq;
@ -91,7 +91,7 @@ pub impl<T:Copy Num NumCast Trig Exp Extent Ord AngleConv> Quat<T>: Quaternion<T
#[inline(always)] #[inline(always)]
pure fn to_ptr() -> *T { pure fn to_ptr() -> *T {
addr_of(&self[0]) to_unsafe_ptr(&self[0])
} }
#[inline(always)] #[inline(always)]

View file

@ -1,6 +1,6 @@
use core::cast::transmute; use core::cast::transmute;
use core::cmp::Eq; use core::cmp::Eq;
use core::ptr::{addr_of, to_unsafe_ptr}; use core::ptr::to_unsafe_ptr;
use core::vec::raw::buf_as_slice; use core::vec::raw::buf_as_slice;
use std::cmp::FuzzyEq; use std::cmp::FuzzyEq;
@ -118,7 +118,7 @@ pub impl<T:Copy> Vec2<T>: Vector<T> {
#[inline(always)] #[inline(always)]
pure fn to_ptr() -> *T { pure fn to_ptr() -> *T {
ptr::addr_of(&self[0]) ptr::to_unsafe_ptr(&self[0])
} }
} }
@ -269,7 +269,7 @@ pub impl<T:Copy> Vec3<T>: Vector<T> {
#[inline(always)] #[inline(always)]
pure fn to_ptr() -> *T { pure fn to_ptr() -> *T {
addr_of(&self[0]) to_unsafe_ptr(&self[0])
} }
} }
@ -438,7 +438,7 @@ pub impl<T:Copy> Vec4<T>: Vector<T> {
#[inline(always)] #[inline(always)]
pure fn to_ptr() -> *T { pure fn to_ptr() -> *T {
addr_of(&self[0]) to_unsafe_ptr(&self[0])
} }
} }