MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / operator<

Method operator<

json/jsoncpp.cpp:2772–2787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2770#endif
2771
2772bool Value::CZString::operator<(const CZString& other) const {
2773 if (!cstr_)
2774 return index_ < other.index_;
2775 // return strcmp(cstr_, other.cstr_) < 0;
2776 // Assume both are strings.
2777 unsigned this_len = this->storage_.length_;
2778 unsigned other_len = other.storage_.length_;
2779 unsigned min_len = std::min<unsigned>(this_len, other_len);
2780 JSON_ASSERT(this->cstr_ && other.cstr_);
2781 int comp = memcmp(this->cstr_, other.cstr_, min_len);
2782 if (comp < 0)
2783 return true;
2784 if (comp > 0)
2785 return false;
2786 return (this_len < other_len);
2787}
2788
2789bool Value::CZString::operator==(const CZString& other) const {
2790 if (!cstr_)

Callers

nothing calls this directly

Calls 2

decodePrefixedStringFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected