зеркало из https://github.com/mozilla/moz-skia.git
Add operator delete to match operator new for SkTLList.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6871061 git-svn-id: http://skia.googlecode.com/svn/trunk@6673 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
fdabcb511d
Коммит
8958dc949e
|
@ -349,6 +349,17 @@ void *operator new(size_t, SkTLList<T>* list,
|
|||
}
|
||||
}
|
||||
|
||||
// Skia doesn't use C++ exceptions but it may be compiled with them enabled. Having an op delete
|
||||
// to match the op new silences warnings about missing op delete when a constructor throws an
|
||||
// exception.
|
||||
template <typename T>
|
||||
void operator delete(void*,
|
||||
SkTLList<T>*,
|
||||
typename SkTLList<T>::Placement,
|
||||
const typename SkTLList<T>::Iter&) {
|
||||
SK_CRASH();
|
||||
}
|
||||
|
||||
#define SkNEW_INSERT_IN_LLIST_BEFORE(list, location, type_name, args) \
|
||||
(new ((list), SkTLList< type_name >::kBefore_Placement, (location)) type_name args)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче