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

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

Issue 304013002: [NaCl SDK] Create Filesystem nodes in /dev/fs/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 48c4eb9b9f60e764f3d44db64af0379502755fe2..b3b8f5b41a5cba09693f4b818d5a61743a79c10e 100644
--- a/native_client_sdk/src/libraries/sdk_util/scoped_ref.h
+++ b/native_client_sdk/src/libraries/sdk_util/scoped_ref.h
@@ -81,6 +81,11 @@ class ScopedRef : public ScopedRefBase {
}
};
+template <typename U, typename T>
+ScopedRef<U> static_scoped_ref_cast(const ScopedRef<T>& ptr) {
+ return ScopedRef<U>(static_cast<U*>(ptr.get()));
+}
+
} // namespace sdk_util
#endif // LIBRARIES_SDK_UTIL_SCOPED_REF_H_
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc ('k') | native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698