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

Unified Diff: base/mac/foundation_util.mm

Issue 1927003004: Mac: Introduce "StaticCast" variants of base::mac::FooCastStrict, which do not typecheck in Release (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split out NSClassFromString stuff Created 4 years, 8 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: base/mac/foundation_util.mm
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 6ae5df3389977a2268567f062d540d5d11418434..d004ec720a8e18054e2df4337df7b69ccfada575 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -342,13 +342,6 @@ CFCast<TypeCF##Ref>(const CFTypeRef& cf_val) { \
return (TypeCF##Ref)(cf_val); \
} \
return NULL; \
-} \
-\
-template<> TypeCF##Ref \
-CFCastStrict<TypeCF##Ref>(const CFTypeRef& cf_val) { \
- TypeCF##Ref rv = CFCast<TypeCF##Ref>(cf_val); \
- DCHECK(cf_val == NULL || rv); \
- return rv; \
}
CF_CAST_DEFN(CFArray);
@@ -393,13 +386,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
}
return NULL;
}
-
-template<> CTFontRef
-CFCastStrict<CTFontRef>(const CFTypeRef& cf_val) {
- CTFontRef rv = CFCast<CTFontRef>(cf_val);
- DCHECK(cf_val == NULL || rv);
- return rv;
-}
#endif
#if !defined(OS_IOS)

Powered by Google App Engine
This is Rietveld 408576698