MCPcopy Create free account
hub / github.com/ValveSoftware/Proton / operator<

Method operator<

vrclient_x64/jsoncpp.cpp:2697–2708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2695}
2696
2697bool Value::CZString::operator<(const CZString& other) const {
2698 if (!cstr_) return index_ < other.index_;
2699 //return strcmp(cstr_, other.cstr_) < 0;
2700 // Assume both are strings.
2701 unsigned this_len = this->storage_.length_;
2702 unsigned other_len = other.storage_.length_;
2703 unsigned min_len = std::min(this_len, other_len);
2704 int comp = memcmp(this->cstr_, other.cstr_, min_len);
2705 if (comp < 0) return true;
2706 if (comp > 0) return false;
2707 return (this_len < other_len);
2708}
2709
2710bool Value::CZString::operator==(const CZString& other) const {
2711 if (!cstr_) return index_ == other.index_;

Callers

nothing calls this directly

Calls 2

decodePrefixedStringFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected