| 493 | if (sv->data) { |
| 494 | for (size_t i = 0; i < sv->count; ++i) { |
| 495 | if (sv->data[i]) free(sv->data[i]); |
| 496 | } |
| 497 | free(sv->data); |
| 498 | sv->data = NULL; |
| 499 | } |
| 500 | sv->count = 0; |
| 501 | sv->capacity = 0; |
| 502 | } |
| 503 | |
| 504 | void StringVector_add(StringVector* sv, const char* str) { |
| 505 | if (sv->count >= sv->capacity) { |
| 506 | size_t new_capacity = sv->capacity * 2; |
nothing calls this directly
no outgoing calls
no test coverage detected