MCPcopy Create free account
hub / github.com/Kitware/CMake / operator==

Method operator==

Utilities/cmjsoncpp/src/lib_json/json_value.cpp:312–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312bool Value::CZString::operator==(const CZString& other) const {
313 if (!cstr_)
314 return index_ == other.index_;
315 // return strcmp(cstr_, other.cstr_) == 0;
316 // Assume both are strings.
317 unsigned this_len = this->storage_.length_;
318 unsigned other_len = other.storage_.length_;
319 if (this_len != other_len)
320 return false;
321 JSON_ASSERT(this->cstr_ && other.cstr_);
322 int comp = memcmp(this->cstr_, other.cstr_, this_len);
323 return comp == 0;
324}
325
326ArrayIndex Value::CZString::index() const { return index_; }
327

Callers

nothing calls this directly

Calls 4

decodePrefixedStringFunction · 0.85
typeClass · 0.50
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected