Commit 663a6bb5 authored by sanjoy@chromium.org's avatar sanjoy@chromium.org

Fix MSVC warnings about missing operator delete.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10556038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6568d73d
......@@ -74,6 +74,11 @@ class List {
AllocationPolicy::Delete(p);
}
// Please the MSVC compiler. We should never have to execute this.
INLINE(void operator delete(void* p, AllocationPolicy allocator)) {
UNREACHABLE();
}
// Returns a reference to the element at index i. This reference is
// not safe to use after operations that can change the list's
// backing store (e.g. Add).
......
......@@ -66,9 +66,13 @@ class SplayTree {
AllocationPolicy allocator = AllocationPolicy())) {
return allocator.New(static_cast<int>(size));
}
INLINE(void operator delete(void* p, size_t)) {
INLINE(void operator delete(void* p)) {
AllocationPolicy::Delete(p);
}
// Please the MSVC compiler. We should never have to execute this.
INLINE(void operator delete(void* p, AllocationPolicy policy)) {
UNREACHABLE();
}
// Inserts the given key in this tree with the given value. Returns
// true if a node was inserted, otherwise false. If found the locator
......@@ -119,9 +123,14 @@ class SplayTree {
INLINE(void* operator new(size_t size, AllocationPolicy allocator)) {
return allocator.New(static_cast<int>(size));
}
INLINE(void operator delete(void* p, size_t)) {
INLINE(void operator delete(void* p)) {
return AllocationPolicy::Delete(p);
}
// Please the MSVC compiler. We should never have to execute
// this.
INLINE(void operator delete(void* p, AllocationPolicy allocator)) {
UNREACHABLE();
}
Key key() { return key_; }
Value value() { return value_; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment