| 504 | } |
| 505 | |
| 506 | MMKV_EXPORT void removeValuesForKeys(void *handle, char **keyArray, uint32_t *sizeArray, uint64_t count) { |
| 507 | MMKV *kv = static_cast<MMKV *>(handle); |
| 508 | if (kv && keyArray && sizeArray && count > 0) { |
| 509 | vector<string> arrKeys; |
| 510 | arrKeys.reserve(count); |
| 511 | for (uint64_t index = 0; index < count; index++) { |
| 512 | if (sizeArray[index] > 0 && keyArray[index]) { |
| 513 | arrKeys.emplace_back(keyArray[index], sizeArray[index]); |
| 514 | } |
| 515 | } |
| 516 | if (!arrKeys.empty()) { |
| 517 | kv->removeValuesForKeys(arrKeys); |
| 518 | } |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | MMKV_EXPORT void clearAll(void *handle, bool keepSpace) { |
| 523 | MMKV *kv = static_cast<MMKV *>(handle); |
nothing calls this directly
no test coverage detected