MCPcopy Create free account
hub / github.com/Tencent/MMKV / encodeFloat_2

Function encodeFloat_2

Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp:582–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582MMKV_JNI jboolean encodeFloat_2(JNIEnv *env, jobject obj, jlong handle, jstring oKey, jfloat value, jint expiration) {
583 MMKV *kv = reinterpret_cast<MMKV *>(handle);
584 if (kv && oKey) {
585 string key = jstring2string(env, oKey);
586 return (jboolean) kv->set((float) value, key, (uint32_t) expiration);
587 }
588 return (jboolean) false;
589}
590
591MMKV_JNI jfloat decodeFloat(JNIEnv *env, jobject, jlong handle, jstring oKey, jfloat defaultValue) {
592 MMKV *kv = reinterpret_cast<MMKV *>(handle);

Callers

nothing calls this directly

Calls 2

jstring2stringFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected