MCPcopy Create free account
hub / github.com/apple/foundationdb / compare

Method compare

fdbclient/include/fdbclient/VersionVector.h:177–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 bool operator<(const VersionVector& vv) const { return maxVersion < vv.maxVersion; }
176
177 bool compare(const VersionVector& vv) {
178 if (maxVersion != vv.maxVersion) {
179 return false;
180 }
181
182 if (versions.size() != vv.versions.size()) {
183 return false;
184 }
185
186 auto iterA = versions.begin();
187 auto iterB = vv.versions.begin();
188 for (; iterA != versions.end(); iterA++, iterB++) {
189 if (iterA->first != iterB->first || iterA->second != iterB->second) {
190 return false;
191 }
192 }
193 ASSERT(iterB == vv.versions.end());
194
195 return true;
196 }
197
198 //
199 // Methods to set/get/check cached encoded version vector size.

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected