| 320 | } |
| 321 | |
| 322 | MMKV_EXPORT bool encodeFloat(void *handle, GoStringWrap oKey, float value) { |
| 323 | MMKV *kv = static_cast<MMKV *>(handle); |
| 324 | if (kv && oKey.ptr) { |
| 325 | auto key = string(oKey.ptr, oKey.length); |
| 326 | return kv->set((float) value, key); |
| 327 | } |
| 328 | return false; |
| 329 | } |
| 330 | |
| 331 | MMKV_EXPORT bool encodeFloat_v2(void *handle, GoStringWrap oKey, float value, uint32_t expireDuration) { |
| 332 | MMKV *kv = static_cast<MMKV *>(handle); |