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

Method InsertInternal

extern/re2/re2/sparse_set.h:143–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141
142 private:
143 iterator InsertInternal(bool allow_existing, int i) {
144 DebugCheckInvariants();
145 if (static_cast<uint32_t>(i) >= static_cast<uint32_t>(max_size())) {
146 assert(false && "illegal index");
147 // Semantically, end() would be better here, but we already know
148 // the user did something stupid, so begin() insulates them from
149 // dereferencing an invalid pointer.
150 return begin();
151 }
152 if (!allow_existing) {
153 assert(!contains(i));
154 create_index(i);
155 } else {
156 if (!contains(i))
157 create_index(i);
158 }
159 DebugCheckInvariants();
160 return dense_.data() + sparse_[i];
161 }
162
163 // Add the index i to the set.
164 // Only use if contains(i) is known to be false.

Callers

nothing calls this directly

Calls 5

assertClass · 0.85
create_indexFunction · 0.85
beginFunction · 0.50
containsFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected