| 2760 | } |
| 2761 | |
| 2762 | bool Value::CZString::operator==(const CZString& other) const { |
| 2763 | if (!cstr_) return index_ == other.index_; |
| 2764 | //return strcmp(cstr_, other.cstr_) == 0; |
| 2765 | // Assume both are strings. |
| 2766 | unsigned this_len = this->storage_.length_; |
| 2767 | unsigned other_len = other.storage_.length_; |
| 2768 | if (this_len != other_len) return false; |
| 2769 | JSON_ASSERT(this->cstr_ && other.cstr_); |
| 2770 | int comp = memcmp(this->cstr_, other.cstr_, this_len); |
| 2771 | return comp == 0; |
| 2772 | } |
| 2773 | |
| 2774 | ArrayIndex Value::CZString::index() const { return index_; } |
| 2775 |
nothing calls this directly
no test coverage detected