Shutup strict aliasing warnings in SkTLazy
Review URL: http://codereview.appspot.com/5020042/ git-svn-id: http://skia.googlecode.com/svn/trunk@2263 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
8966d0149b
commit
cff323ecd8
@ -52,7 +52,7 @@ public:
|
||||
if (this->isValid()) {
|
||||
fPtr->~T();
|
||||
}
|
||||
fPtr = new (fStorage) T;
|
||||
fPtr = new (SkTCast<T*>(fStorage)) T;
|
||||
return fPtr;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
if (this->isValid()) {
|
||||
*fPtr = src;
|
||||
} else {
|
||||
fPtr = new (fStorage) T(src);
|
||||
fPtr = new (SkTCast<T*>(fStorage)) T(src);
|
||||
}
|
||||
return fPtr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user