| 2791 | } |
| 2792 | |
| 2793 | bool Value::CZString::operator==(const CZString& other) const { |
| 2794 | if (!cstr_) return index_ == other.index_; |
| 2795 | //return strcmp(cstr_, other.cstr_) == 0; |
| 2796 | // Assume both are strings. |
| 2797 | unsigned this_len = this->storage_.length_; |
| 2798 | unsigned other_len = other.storage_.length_; |
| 2799 | if (this_len != other_len) return false; |
| 2800 | JSON_ASSERT(this->cstr_ && other.cstr_); |
| 2801 | int comp = memcmp(this->cstr_, other.cstr_, this_len); |
| 2802 | return comp == 0; |
| 2803 | } |
| 2804 | |
| 2805 | ArrayIndex Value::CZString::index() const { return index_; } |
| 2806 |
nothing calls this directly
no test coverage detected