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:
bsalomon@google.com 2012-12-05 14:51:39 +00:00
Родитель fdabcb511d
Коммит 8958dc949e
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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)