From 4fd17d627106fde01284075038e15cc0680611bc Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Tue, 26 Feb 2019 14:38:54 +0300 Subject: Return initializer list where it is possible This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler --- src/lib/corelib/tools/applecodesignutils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/corelib/tools/applecodesignutils.cpp') diff --git a/src/lib/corelib/tools/applecodesignutils.cpp b/src/lib/corelib/tools/applecodesignutils.cpp index f89fc7732..67c4f5238 100644 --- a/src/lib/corelib/tools/applecodesignutils.cpp +++ b/src/lib/corelib/tools/applecodesignutils.cpp @@ -58,17 +58,17 @@ QByteArray smimeMessageContent(const QByteArray &data) { QCFType decoder = NULL; if (CMSDecoderCreate(&decoder) != noErr) - return QByteArray(); + return {}; if (CMSDecoderUpdateMessage(decoder, data.constData(), data.size()) != noErr) - return QByteArray(); + return {}; if (CMSDecoderFinalizeMessage(decoder) != noErr) - return QByteArray(); + return {}; QCFType content = NULL; if (CMSDecoderCopyContent(decoder, &content) != noErr) - return QByteArray(); + return {}; return QByteArray::fromCFData(content); } @@ -83,7 +83,7 @@ QVariantMap certificateInfo(const QByteArray &data) for (const auto &extension : cert.extensions()) { if (extension.name() == QStringLiteral("extendedKeyUsage")) { if (!extension.value().toStringList().contains(QStringLiteral("Code Signing"))) - return QVariantMap(); + return {}; } } @@ -120,7 +120,7 @@ QVariantMap identitiesProperties() &kCFTypeDictionaryValueCallBacks); QCFType result = NULL; if (SecItemCopyMatching(query, &result) != errSecSuccess) - return QVariantMap(); + return {}; QVariantMap items; const auto tryAppend = [&](SecIdentityRef identity) { -- cgit v1.2.3