aboutsummaryrefslogtreecommitdiff
path: root/lib/events/event.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-21 07:37:01 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-04 18:42:11 +0200
commitbd2736bc9f8b6023ecbc21d0d831856703b853db (patch)
tree8811e0a995dcd593cb9f233e02ece9402e76eb1b /lib/events/event.h
parent715d9e4a858423e8bd9492e3a88d591670349bab (diff)
downloadlibquotient-bd2736bc9f8b6023ecbc21d0d831856703b853db.tar.gz
libquotient-bd2736bc9f8b6023ecbc21d0d831856703b853db.zip
SingleKeyValue: use reference for template parameter
I guess it was simply overlooked originally; in any case, currently used compilers deal with the reference just as fine as with the pointer.
Diffstat (limited to 'lib/events/event.h')
-rw-r--r--lib/events/event.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/events/event.h b/lib/events/event.h
index c8ef5acb..0abef1f0 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -511,19 +511,19 @@ public:
/// To retrieve the value the getter uses a JSON key name that corresponds to
/// its own (getter's) name but written in snake_case. \p GetterName_ must be
/// in camelCase, no quotes (an identifier, not a literal).
-#define DEFINE_SIMPLE_EVENT(Name_, Base_, TypeId_, ValueType_, GetterName_, \
- JsonKey_) \
- constexpr auto Name_##ContentKey = JsonKey_##_ls; \
- class QUOTIENT_API Name_ \
- : public EventTemplate< \
- Name_, Base_, \
- EventContent::SingleKeyValue<ValueType_, &Name_##ContentKey>> { \
- public: \
- QUO_EVENT(Name_, TypeId_) \
- using value_type = ValueType_; \
- using EventTemplate::EventTemplate; \
- QUO_CONTENT_GETTER_X(ValueType_, GetterName_, Name_##ContentKey) \
- }; \
+#define DEFINE_SIMPLE_EVENT(Name_, Base_, TypeId_, ValueType_, GetterName_, \
+ JsonKey_) \
+ constexpr auto Name_##ContentKey = JsonKey_##_ls; \
+ class QUOTIENT_API Name_ \
+ : public EventTemplate< \
+ Name_, Base_, \
+ EventContent::SingleKeyValue<ValueType_, Name_##ContentKey>> { \
+ public: \
+ QUO_EVENT(Name_, TypeId_) \
+ using value_type = ValueType_; \
+ using EventTemplate::EventTemplate; \
+ QUO_CONTENT_GETTER_X(ValueType_, GetterName_, Name_##ContentKey) \
+ }; \
// End of macro
// === is<>(), eventCast<>() and switchOnType<>() ===