diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-12 15:47:59 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-12 15:47:59 +0900 |
commit | 1ece121b14ae82f7dd0b893d0dbef3de7c84d303 (patch) | |
tree | 239c91d30127e459b025b9d5f9058aa3e4dc4a92 | |
parent | cf19c87f6561afee7aba5591d3c81b7a158449ea (diff) | |
download | libquotient-1ece121b14ae82f7dd0b893d0dbef3de7c84d303.tar.gz libquotient-1ece121b14ae82f7dd0b893d0dbef3de7c84d303.zip |
e2ee.h: Make constants inline instead of static
This changes from internal linkage for every translation unit including
e2ee.h to external linkage across translation units but without the need
to create a .cpp file just to define and init the constants.
-rw-r--r-- | lib/e2ee.h | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -5,27 +5,27 @@ #include <QtCore/QStringList> namespace Quotient { -static const auto CiphertextKeyL = "ciphertext"_ls; -static const auto SenderKeyKeyL = "sender_key"_ls; -static const auto DeviceIdKeyL = "device_id"_ls; -static const auto SessionIdKeyL = "session_id"_ls; +inline const auto CiphertextKeyL = "ciphertext"_ls; +inline const auto SenderKeyKeyL = "sender_key"_ls; +inline const auto DeviceIdKeyL = "device_id"_ls; +inline const auto SessionIdKeyL = "session_id"_ls; -static const auto AlgorithmKeyL = "algorithm"_ls; -static const auto RotationPeriodMsKeyL = "rotation_period_ms"_ls; -static const auto RotationPeriodMsgsKeyL = "rotation_period_msgs"_ls; +inline const auto AlgorithmKeyL = "algorithm"_ls; +inline const auto RotationPeriodMsKeyL = "rotation_period_ms"_ls; +inline const auto RotationPeriodMsgsKeyL = "rotation_period_msgs"_ls; -static const auto AlgorithmKey = QStringLiteral("algorithm"); -static const auto RotationPeriodMsKey = QStringLiteral("rotation_period_ms"); -static const auto RotationPeriodMsgsKey = +inline const auto AlgorithmKey = QStringLiteral("algorithm"); +inline const auto RotationPeriodMsKey = QStringLiteral("rotation_period_ms"); +inline const auto RotationPeriodMsgsKey = QStringLiteral("rotation_period_msgs"); -static const auto Ed25519Key = QStringLiteral("ed25519"); -static const auto Curve25519Key = QStringLiteral("curve25519"); -static const auto SignedCurve25519Key = QStringLiteral("signed_curve25519"); -static const auto OlmV1Curve25519AesSha2AlgoKey = +inline const auto Ed25519Key = QStringLiteral("ed25519"); +inline const auto Curve25519Key = QStringLiteral("curve25519"); +inline const auto SignedCurve25519Key = QStringLiteral("signed_curve25519"); +inline const auto OlmV1Curve25519AesSha2AlgoKey = QStringLiteral("m.olm.v1.curve25519-aes-sha2"); -static const auto MegolmV1AesSha2AlgoKey = +inline const auto MegolmV1AesSha2AlgoKey = QStringLiteral("m.megolm.v1.aes-sha2"); -static const QStringList SupportedAlgorithms = { OlmV1Curve25519AesSha2AlgoKey, +inline const QStringList SupportedAlgorithms = { OlmV1Curve25519AesSha2AlgoKey, MegolmV1AesSha2AlgoKey }; } // namespace Quotient |