| 172 | |
| 173 | template <typename T> |
| 174 | static void EnsureLuaProfilerCapacity(dmArray<T>* array, uint32_t additional_count, uint32_t min_capacity) |
| 175 | { |
| 176 | if (array->Remaining() >= additional_count) |
| 177 | { |
| 178 | return; |
| 179 | } |
| 180 | |
| 181 | uint32_t new_capacity = array->Capacity() == 0 ? min_capacity : array->Capacity() * 2; |
| 182 | uint32_t required_capacity = array->Size() + additional_count; |
| 183 | if (new_capacity < required_capacity) |
| 184 | { |
| 185 | new_capacity = required_capacity; |
| 186 | } |
| 187 | |
| 188 | array->SetCapacity(new_capacity); |
| 189 | } |
| 190 | |
| 191 | static const char* GetLuaProfilerScopeName(LuaProfilerScopeState* state, const LuaProfilerScope* scope) |
| 192 | { |
no test coverage detected