| 441 | } |
| 442 | |
| 443 | HOSTDEVICE static inline void PD_PString_ReserveAmortized(PD_PString *str, |
| 444 | size_t new_cap) { |
| 445 | const size_t curr_cap = PD_PString_GetCapacity(str); |
| 446 | if (new_cap > curr_cap) { |
| 447 | PD_PString_Reserve(str, new_cap > 2 * curr_cap ? new_cap : 2 * curr_cap); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | HOSTDEVICE static inline char *PD_PString_Resize(PD_PString *str, |
| 452 | size_t new_size, |
no test coverage detected