summaryrefslogtreecommitdiff
path: root/include/pso/macros.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-02-28 16:29:37 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-02-28 16:29:37 -0400
commiteff1cad4048d796fb3116bf07162a0f6d67e8c2b (patch)
tree294488f9bd24f659a3462234f02d4a667e311e3f /include/pso/macros.h
parentf6c047795d651962374fcb20d37359c763aeb9c8 (diff)
macros: Make the getter of `PRIVATE_MEMBER_ACCESSORS` return a
reference, and add `PRIVATE_MEMBER_ACCESSORS_NON_REF`
Diffstat (limited to 'include/pso/macros.h')
-rw-r--r--include/pso/macros.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/pso/macros.h b/include/pso/macros.h
index e93e2de..afe5400 100644
--- a/include/pso/macros.h
+++ b/include/pso/macros.h
@@ -85,7 +85,11 @@
}
#define PRIVATE_MEMBER_ACCESSORS(type, name) \
- PRIVATE_MEMBER_GETTER(type, name); \
+ PRIVATE_MEMBER_GETTER(type &, name); \
+ PRIVATE_MEMBER_SETTER(type, name)
+
+#define PRIVATE_MEMBER_ACCESSORS_NON_REF(type, name) \
+ PRIVATE_MEMBER_GETTER(type, name); \
PRIVATE_MEMBER_SETTER(type, name)
#define PRIVATE_MEMBER_ACCESSORS_ARRAY(type, name, size) \