MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / SetInternal

Method SetInternal

extern/re2/re2/sparse_array.h:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209 private:
210 iterator SetInternal(bool allow_existing, int i, const Value& v) {
211 DebugCheckInvariants();
212 if (static_cast<uint32_t>(i) >= static_cast<uint32_t>(max_size())) {
213 assert(false && "illegal index");
214 // Semantically, end() would be better here, but we already know
215 // the user did something stupid, so begin() insulates them from
216 // dereferencing an invalid pointer.
217 return begin();
218 }
219 if (!allow_existing) {
220 assert(!has_index(i));
221 create_index(i);
222 } else {
223 if (!has_index(i))
224 create_index(i);
225 }
226 return SetExistingInternal(i, v);
227 }
228
229 iterator SetExistingInternal(int i, const Value& v) {
230 DebugCheckInvariants();

Callers

nothing calls this directly

Calls 3

assertClass · 0.85
create_indexFunction · 0.85
beginFunction · 0.50

Tested by

no test coverage detected