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

Unified Diff: base/mac/scoped_cftyperef.h

Issue 1551943002: Rewrite most of the scopers in //base/mac to use ScopedTypeRef or ScopedGeneric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS Created 5 years 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: base/mac/scoped_cftyperef.h
diff --git a/base/mac/scoped_cftyperef.h b/base/mac/scoped_cftyperef.h
index 3a77da15f5605cfb1eb0ebcf21e20e10f5baebb2..1be0fbe56d1e1002f2c96b71c550a9b28b0b505e 100644
--- a/base/mac/scoped_cftyperef.h
+++ b/base/mac/scoped_cftyperef.h
@@ -30,8 +30,9 @@ namespace internal {
template<typename CFT>
struct ScopedCFTypeRefTraits {
static CFT InvalidValue() { return nullptr; }
- static void Retain(CFT object) {
+ static CFT Retain(CFT object) {
CFRetain(object);
+ return object;
}
static void Release(CFT object) {
CFRelease(object);

Powered by Google App Engine
This is Rietveld 408576698