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

Unified Diff: base/memory/linked_ptr.h

Issue 454433002: PPAPI: Introduce concept of ResourceHosts "pinning" each other (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | ppapi/host/ppapi_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/linked_ptr.h
diff --git a/base/memory/linked_ptr.h b/base/memory/linked_ptr.h
index 80044add81c22cbd63f9d1d8fefa6ea077d3652b..251ba169e14785f70298700f4fb6d0f6ea4d1e0a 100644
--- a/base/memory/linked_ptr.h
+++ b/base/memory/linked_ptr.h
@@ -134,6 +134,8 @@ class linked_ptr {
bool operator!=(linked_ptr<U> const& ptr) const {
return value_ != ptr.get();
}
+ // To allow use as a key in map or set.
+ bool operator<(linked_ptr<T> const& ptr) const { return value_ < ptr.get(); }
private:
template <typename U>
« no previous file with comments | « no previous file | ppapi/host/ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698