зеркало из https://github.com/electron/electron.git
4669995: Remove CFToNSCast and NSToCFCast
https://chromium-review.googlesource.com/c/chromium/src/+/4669995
This commit is contained in:
Родитель
30ecab32cb
Коммит
38e145f33d
|
@ -20,7 +20,9 @@ std::string ApplicationInfoDictionaryValue(NSString* key) {
|
|||
}
|
||||
|
||||
std::string ApplicationInfoDictionaryValue(CFStringRef key) {
|
||||
return ApplicationInfoDictionaryValue(base::mac::CFToNSCast(key));
|
||||
NSString* key_ns =
|
||||
const_cast<NSString*>(reinterpret_cast<const NSString*>(key));
|
||||
return ApplicationInfoDictionaryValue(key_ns);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -30,8 +30,9 @@ namespace {
|
|||
// thread safe, including LSGetApplicationForURL (> 10.2) and
|
||||
// NSWorkspace#openURLs.
|
||||
std::string OpenURL(NSURL* ns_url, bool activate) {
|
||||
CFURLRef ref = LSCopyDefaultApplicationURLForURL(
|
||||
base::mac::NSToCFCast(ns_url), kLSRolesAll, nullptr);
|
||||
CFURLRef cf_url = reinterpret_cast<CFURLRef>(ns_url);
|
||||
CFURLRef ref =
|
||||
LSCopyDefaultApplicationURLForURL(cf_url, kLSRolesAll, nullptr);
|
||||
|
||||
// If no application could be found, NULL is returned and outError
|
||||
// (if not NULL) is populated with kLSApplicationNotFoundErr.
|
||||
|
|
Загрузка…
Ссылка в новой задаче