From 4d4d363b29ff4e471511ff454a58d7d8b88d215d Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Jun 2022 15:54:36 +0200 Subject: Start using C++20's designated initializers --- lib/e2ee/e2ee.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/e2ee/e2ee.h') diff --git a/lib/e2ee/e2ee.h b/lib/e2ee/e2ee.h index 7b9b5820..449e6ef7 100644 --- a/lib/e2ee/e2ee.h +++ b/lib/e2ee/e2ee.h @@ -37,11 +37,11 @@ constexpr auto SignedCurve25519Key = "signed_curve25519"_ls; constexpr auto OlmV1Curve25519AesSha2AlgoKey = "m.olm.v1.curve25519-aes-sha2"_ls; constexpr auto MegolmV1AesSha2AlgoKey = "m.megolm.v1.aes-sha2"_ls; +constexpr std::array SupportedAlgorithms { OlmV1Curve25519AesSha2AlgoKey, + MegolmV1AesSha2AlgoKey }; + inline bool isSupportedAlgorithm(const QString& algorithm) { - static constexpr std::array SupportedAlgorithms { - OlmV1Curve25519AesSha2AlgoKey, MegolmV1AesSha2AlgoKey - }; return std::find(SupportedAlgorithms.cbegin(), SupportedAlgorithms.cend(), algorithm) != SupportedAlgorithms.cend(); -- cgit v1.2.3