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 | |
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')
-rw-r--r-- | include/pso/PSOV3Encryption.h | 4 | ||||
-rw-r--r-- | include/pso/macros.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/pso/PSOV3Encryption.h b/include/pso/PSOV3Encryption.h index 0526cfb..966ff70 100644 --- a/include/pso/PSOV3Encryption.h +++ b/include/pso/PSOV3Encryption.h @@ -24,8 +24,8 @@ public: virtual u32 next() override; PRIVATE_MEMBER_ACCESSORS_ARRAY(u32, buffer, 522); - PRIVATE_MEMBER_ACCESSORS(u32 *, buffer_start); - PRIVATE_MEMBER_ACCESSORS(u32 *, buffer_end); + PRIVATE_MEMBER_ACCESSORS_NON_REF(u32 *, buffer_start); + PRIVATE_MEMBER_ACCESSORS_NON_REF(u32 *, buffer_end); private: TArray<u32, 522> m_buffer; 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) \ |