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

Method setStringOrData

Fleece/Mutable/ValueSlot.cc:209–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208
209 void ValueSlot::setStringOrData(tags valueTag, slice s) {
210 if (s.size + 1 <= kInlineCapacity) {
211 // Short strings can go inline:
212 setInline(valueTag, (int)s.size);
213 s.copyTo(&_inlineVal[1]);
214 } else {
215 setPointer(HeapValue::createStr(valueTag, s)->asValue());
216 }
217 }
218
219
220 HeapCollection* ValueSlot::asMutableCollection() const {

Callers

nothing calls this directly

Calls 2

copyToMethod · 0.80
asValueMethod · 0.45

Tested by

no test coverage detected