MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / operator<

Function operator<

Source/ThirdParty/rapidjson/pointer.h:390–411  ·  view source on GitHub ↗

Less than operator. ! \note Invalid pointers are always greater than valid ones. */

Source from the content-addressed store, hash-verified

388 \note Invalid pointers are always greater than valid ones.
389 */
390 bool operator<(const GenericPointer& rhs) const {
391 if (!IsValid())
392 return false;
393 if (!rhs.IsValid())
394 return true;
395
396 if (tokenCount_ != rhs.tokenCount_)
397 return tokenCount_ < rhs.tokenCount_;
398
399 for (size_t i = 0; i < tokenCount_; i++) {
400 if (tokens_[i].index != rhs.tokens_[i].index)
401 return tokens_[i].index < rhs.tokens_[i].index;
402
403 if (tokens_[i].length != rhs.tokens_[i].length)
404 return tokens_[i].length < rhs.tokens_[i].length;
405
406 if (int cmp = std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch) * tokens_[i].length))
407 return cmp < 0;
408 }
409
410 return false;
411 }
412
413 //@}
414

Callers

nothing calls this directly

Calls 3

memcmpFunction · 0.85
IsValidFunction · 0.70
IsValidMethod · 0.45

Tested by

no test coverage detected