| 2748 | } |
| 2749 | |
| 2750 | bool Value::CZString::operator==(const CZString& other) const { |
| 2751 | if (!cstr_) |
| 2752 | return index_ == other.index_; |
| 2753 | // return strcmp(cstr_, other.cstr_) == 0; |
| 2754 | // Assume both are strings. |
| 2755 | unsigned this_len = this->storage_.length_; |
| 2756 | unsigned other_len = other.storage_.length_; |
| 2757 | if (this_len != other_len) |
| 2758 | return false; |
| 2759 | JSON_ASSERT(this->cstr_ && other.cstr_); |
| 2760 | int comp = memcmp(this->cstr_, other.cstr_, this_len); |
| 2761 | return comp == 0; |
| 2762 | } |
| 2763 | |
| 2764 | ArrayIndex Value::CZString::index() const { return index_; } |
| 2765 |
nothing calls this directly
no test coverage detected