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

Function encodeInt

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

Source from the content-addressed store, hash-verified

517}
518
519MMKV_JNI jboolean encodeInt(JNIEnv *env, jobject obj, jlong handle, jstring oKey, jint value) {
520 MMKV *kv = reinterpret_cast<MMKV *>(handle);
521 if (kv && oKey) {
522 string key = jstring2string(env, oKey);
523 return (jboolean) kv->set((int32_t) value, key);
524 }
525 return (jboolean) false;
526}
527
528MMKV_JNI jboolean encodeInt_2(JNIEnv *env, jobject obj, jlong handle, jstring oKey, jint value, jint expiration) {
529 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