From cb40b0808a639fa0de330cb2b88574a0e8b4d2d5 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 4 Mar 2023 17:49:03 -0400 Subject: 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`. --- include/pso/macros.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/pso/macros.h') 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 &name() { \ + return to_TArray(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__) -- cgit v1.2.3-13-gbd6f