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

Method rangeCheck

Fleece/Support/SmallVectorBase.hh:46–50  ·  view source on GitHub ↗

Throws if size/capacity is too big, and returns cast to uint32_t

Source from the content-addressed store, hash-verified

44
45 // Throws if size/capacity is too big, and returns cast to uint32_t
46 static uint32_t rangeCheck(size_t n) {
47 if (_usuallyFalse(n > max_size))
48 throw std::domain_error("smallVector size/capacity too large");
49 return uint32_t(n);
50 }
51
52
53 // Pointer to first item

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected