diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-28 16:29:37 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-28 16:29:37 -0400 |
commit | eff1cad4048d796fb3116bf07162a0f6d67e8c2b (patch) | |
tree | 294488f9bd24f659a3462234f02d4a667e311e3f /include/pso/macros.h | |
parent | f6c047795d651962374fcb20d37359c763aeb9c8 (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.h | 6 |
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) \ |