MCPcopy Create free account
hub / github.com/couchbase/fleece / getMutableDict

Method getMutableDict

Fleece/Tree/MutableHashTree.cc:142–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 }
141
142 MutableDict MutableHashTree::getMutableDict(slice key) {
143 MutableDict result;
144 insert(key, [&](Value value) -> Value {
145 auto dict = value.asDict();
146 result = dict.asMutable();
147 if (!result)
148 result = dict.mutableCopy();
149 return result;
150 });
151 return result;
152 }
153
154 uint32_t MutableHashTree::writeTo(Encoder &enc) {
155 if (_root) {

Callers

nothing calls this directly

Calls 4

insertFunction · 0.85
asDictMethod · 0.45
asMutableMethod · 0.45
mutableCopyMethod · 0.45

Tested by

no test coverage detected