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

Unified Diff: native_client_sdk/src/libraries/sdk_util/scoped_ref.h

Issue 19271009: [NaCl SDK} Add EventListener and EventEmitter to support epoll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove extra mutex Created 7 years, 5 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
Index: native_client_sdk/src/libraries/sdk_util/scoped_ref.h
diff --git a/native_client_sdk/src/libraries/sdk_util/scoped_ref.h b/native_client_sdk/src/libraries/sdk_util/scoped_ref.h
index 841f12bb66ae01a403c98382559d771a3e14fa0d..57424d48948e7721d6b89f32638f6c7f6ec63cbc 100644
--- a/native_client_sdk/src/libraries/sdk_util/scoped_ref.h
+++ b/native_client_sdk/src/libraries/sdk_util/scoped_ref.h
@@ -70,6 +70,11 @@ class ScopedRef : public ScopedRefBase {
T& operator*() const { return *get(); }
T* operator->() const { return get(); }
+ // Provided for Map and Set
+ bool operator<(const ScopedRef& other) const {
binji 2013/07/17 22:23:20 Now that I've seen the use case, you could just ad
noelallen1 2013/07/18 22:18:16 Done.
+ return ptr_ < other.ptr_;
+ }
+
private:
typedef void (ScopedRef::*bool_as_func_ptr)() const;
void bool_as_func_impl() const {};

Powered by Google App Engine
This is Rietveld 408576698