diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-04 17:49:03 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-04 17:49:03 -0400 |
commit | cb40b0808a639fa0de330cb2b88574a0e8b4d2d5 (patch) | |
tree | 874b64b99c55f244d97d627f61869c084eea09ed /include/pso/macros.h | |
parent | 1892a429d2b635b369684676f0528a3320f95cc2 (diff) |
TProtocol: Match ctor
The reason for the large change is because I was trying to figure out
why `TTcpSocket`'s ctor was so disjointed from the rest of the
functions. Turns out, it's inlined, and inlining was turned off.
Most likely, the whole codebase has inlining turned off.
oof, press f `TArray`.
Diffstat (limited to 'include/pso/macros.h')
-rw-r--r-- | include/pso/macros.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/pso/macros.h b/include/pso/macros.h index 4e7ad0c..5901143 100644 --- a/include/pso/macros.h +++ b/include/pso/macros.h @@ -75,6 +75,11 @@ return m_##name; \ } +#define PRIVATE_MEMBER_GETTER_C_ARRAY(type, name, size) \ + TArray<type, size> &name() { \ + return to_TArray<type, size>(m_##name); \ + } + #define PRIVATE_MEMBER_GETTER_FUNC(ret_type, name, ...) \ ret_type (*name())(__VA_ARGS__) { \ return m_##name; \ @@ -96,6 +101,9 @@ #define PRIVATE_MEMBER_ACCESSORS_ARRAY(type, name, size) \ PRIVATE_MEMBER_GETTER_ARRAY(type, name, size) +#define PRIVATE_MEMBER_ACCESSORS_C_ARRAY(type, name, size) \ + PRIVATE_MEMBER_GETTER_C_ARRAY(type, name, size) + #define PRIVATE_MEMBER_ACCESSORS_FUNC(ret_type, name, ...) \ PRIVATE_MEMBER_GETTER_FUNC(ret_type, name, __VA_ARGS__); \ PRIVATE_MEMBER_SETTER_FUNC(ret_type, name, __VA_ARGS__) |