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

Method set

Fleece/Integration/MArray.hh:80–88  ·  view source on GitHub ↗

Stores a Native value into the array. If the index is out of range, returns false. */

Source from the content-addressed store, hash-verified

78 /** Stores a Native value into the array.
79 If the index is out of range, returns false. */
80 bool set(size_t i, Native val) {
81 if (_usuallyFalse(!MCollection::isMutable()))
82 return false;
83 if (_usuallyFalse(i >= count() || val == nullptr))
84 return false;
85 MCollection::mutate();
86 _vec[i] = val;
87 return true;
88 }
89
90 /** Inserts the value `val` into the array at index `i`,
91 or returns false if the array is out of range (greater than the count.) */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected