diff options
Diffstat (limited to 'lib/events/single_key_value.h')
-rw-r--r-- | lib/events/single_key_value.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/events/single_key_value.h b/lib/events/single_key_value.h index 5edff3b1..ca2bd331 100644 --- a/lib/events/single_key_value.h +++ b/lib/events/single_key_value.h @@ -5,7 +5,7 @@ namespace Quotient { namespace EventContent { - template <typename T, const QLatin1String* KeyStr> + template <typename T, const QLatin1String& KeyStr> struct SingleKeyValue { // NOLINTBEGIN(google-explicit-constructor): that check should learn // about explicit(false) @@ -20,7 +20,7 @@ namespace EventContent { }; } // namespace EventContent -template <typename ValueT, const QLatin1String* KeyStr> +template <typename ValueT, const QLatin1String& KeyStr> struct JsonConverter<EventContent::SingleKeyValue<ValueT, KeyStr>> { using content_type = EventContent::SingleKeyValue<ValueT, KeyStr>; static content_type load(const QJsonValue& jv) @@ -31,6 +31,6 @@ struct JsonConverter<EventContent::SingleKeyValue<ValueT, KeyStr>> { { return { { JsonKey, toJson(c.value) } }; } - static inline const auto JsonKey = toSnakeCase(*KeyStr); + static inline const auto JsonKey = toSnakeCase(KeyStr); }; } // namespace Quotient |