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