diff options
Diffstat (limited to 'include/pso')
-rw-r--r-- | include/pso/TArray.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -41,6 +41,11 @@ public: }; template<typename T2> + size_t size_as() { + return byte_size() / sizeof(T2); + }; + + template<typename T2> TArray<T2, (n * sizeof(T))/sizeof(T2)> &to() { typedef TArray<T2, sizeof(m_data)/sizeof(T2)> to_type; return reinterpret_cast<to_type &>(*this); |