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

Method getMutableArray

Fleece/Tree/MutableHashTree.cc:130–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129
130 MutableArray MutableHashTree::getMutableArray(slice key) {
131 MutableArray result;
132 insert(key, [&](Value value) -> Value {
133 auto array = value.asArray();
134 result = array.asMutable();
135 if (!result)
136 result = array.mutableCopy();
137 return result;
138 });
139 return result;
140 }
141
142 MutableDict MutableHashTree::getMutableDict(slice key) {
143 MutableDict result;

Callers

nothing calls this directly

Calls 4

insertFunction · 0.85
asArrayMethod · 0.45
asMutableMethod · 0.45
mutableCopyMethod · 0.45

Tested by

no test coverage detected