From 87dbcb62ef00e6509d92ec46d9024e2d1c453df3 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Thu, 2 Mar 2023 11:14:40 -0400 Subject: TArray: Add `size_as()` --- include/pso/TArray.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/pso/TArray.h b/include/pso/TArray.h index 29dc01e..7f53785 100644 --- a/include/pso/TArray.h +++ b/include/pso/TArray.h @@ -40,6 +40,11 @@ public: return reinterpret_cast(m_data); }; + template + size_t size_as() { + return byte_size() / sizeof(T2); + }; + template TArray &to() { typedef TArray to_type; -- cgit v1.2.3-13-gbd6f