refactor: return-braced-init-list pt 2 of 2 (#44870)

* refactor: more return-braced-init-list, this time for v8 and gin objects

* refactor: more return-braced-init-list, this time for v8, gin, std, and base objects
This commit is contained in:
Charles Kerr 2024-11-29 11:44:33 -06:00 committed by GitHub
parent 4a695d07c6
commit f7e823ac80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 64 additions and 64 deletions

View file

@ -25,7 +25,7 @@ std::optional<bool> IsUnsignedOrAdHocSigned(SecCodeRef code) {
}
if (status != errSecSuccess) {
OSSTATUS_LOG(ERROR, status) << "SecCodeCopyStaticCode";
return std::optional<bool>();
return {};
}
// Copy the signing info from the SecStaticCodeRef.
base::apple::ScopedCFTypeRef<CFDictionaryRef> signing_info;
@ -34,7 +34,7 @@ std::optional<bool> IsUnsignedOrAdHocSigned(SecCodeRef code) {
signing_info.InitializeInto());
if (status != errSecSuccess) {
OSSTATUS_LOG(ERROR, status) << "SecCodeCopySigningInformation";
return std::optional<bool>();
return {};
}
// Look up the code signing flags. If the flags are absent treat this as
// unsigned. This decision is consistent with the StaticCode source:
@ -51,7 +51,7 @@ std::optional<bool> IsUnsignedOrAdHocSigned(SecCodeRef code) {
long long flags;
if (!CFNumberGetValue(signing_info_flags, kCFNumberLongLongType, &flags)) {
LOG(ERROR) << "CFNumberGetValue";
return std::optional<bool>();
return {};
}
if (static_cast<uint32_t>(flags) & kSecCodeSignatureAdhoc) {
return true;