feat: sync with Whoa implementation

This commit is contained in:
VDm 2026-04-26 17:10:11 +04:00
parent 12ab8f7721
commit 6928bf3f0c
46 changed files with 2980 additions and 441 deletions

View file

@ -6,17 +6,20 @@
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <new>
template <class T>
class TSGrowableArray : public TSFixedArray<T> {
public:
// Member variables
uint32_t m_chunk = 0;
// Member functions
uint32_t Add(uint32_t count, const T* data);
uint32_t Add(uint32_t count, uint32_t incr, const T* data);
uint32_t CalcChunkSize(uint32_t count);
void GrowToFit(uint32_t index, int32_t zero);
T* New(void);
T* New();
void Reserve(uint32_t count, int32_t round);
uint32_t Reserved() const;
uint32_t RoundToChunk(uint32_t count, uint32_t chunk);