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

Unified Diff: src/zone-allocator.h

Issue 171713004: Fix zone_allocator to support comparison (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone-allocator.h
diff --git a/src/zone-allocator.h b/src/zone-allocator.h
index 5245c6b1bfd45d3d23e5e5efb82a5b4fa4707fba..312d395c8379af143dcaafd530d3c9b58a6e657f 100644
--- a/src/zone-allocator.h
+++ b/src/zone-allocator.h
@@ -69,7 +69,14 @@ class zone_allocator {
void construct(pointer p, const T& val) {
new(static_cast<void*>(p)) T(val);
}
- void destroy(pointer p) { (static_cast<T*>(p))->~T(); }
+ void destroy(pointer p) { p->~T(); }
+
+ bool operator==(zone_allocator const& other) {
+ return zone_ == other.zone_;
+ }
+ bool operator!=(zone_allocator const& other) {
+ return zone_ != other.zone_;
+ }
private:
Zone* zone_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698