Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: src/splay-tree.h

Issue 10556038: Fix MSVC warning about missing operator delete. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove size_t argument from operator delete Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/splay-tree.h
diff --git a/src/splay-tree.h b/src/splay-tree.h
index 388f9b5429f889bc7aebcefaf90ba543a7f3178d..8844d8a8ffeb2d62a856ff19a1bdc2ff58e8aa24 100644
--- a/src/splay-tree.h
+++ b/src/splay-tree.h
@@ -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_; }
« no previous file with comments | « src/list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698