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

Method appendDataWithKey

Core/MMKV_IO.cpp:1057–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057KVHolderRet_t MMKV::appendDataWithKey(const MMBuffer &data, MMKVKey_t key, bool isDataHolder) {
1058#ifdef MMKV_APPLE
1059 auto oData = [key dataUsingEncoding:NSUTF8StringEncoding];
1060 auto keyData = MMBuffer(oData, MMBufferNoCopy);
1061#else
1062 auto keyData = MMBuffer((void *) key.data(), key.size(), MMBufferNoCopy);
1063#endif
1064 return doAppendDataWithKey(data, keyData, isDataHolder, static_cast<uint32_t>(keyData.length()));
1065}
1066
1067KVHolderRet_t MMKV::overrideDataWithKey(const MMBuffer &data, MMKVKey_t key, bool isDataHolder) {
1068#ifdef MMKV_APPLE

Callers

nothing calls this directly

Calls 4

getMemoryMethod · 0.80
MMBufferFunction · 0.70
pbRawVarint32SizeFunction · 0.70
KeyValueHolderClass · 0.70

Tested by

no test coverage detected