| 2698 | } |
| 2699 | |
| 2700 | bool Value::CZString::operator==(const CZString &other) const { |
| 2701 | if (!cstr_) |
| 2702 | return index_ == other.index_; |
| 2703 | // return strcmp(cstr_, other.cstr_) == 0; |
| 2704 | // Assume both are strings. |
| 2705 | unsigned this_len = this->storage_.length_; |
| 2706 | unsigned other_len = other.storage_.length_; |
| 2707 | if (this_len != other_len) |
| 2708 | return false; |
| 2709 | JSON_ASSERT(this->cstr_ && other.cstr_); |
| 2710 | int comp = memcmp(this->cstr_, other.cstr_, this_len); |
| 2711 | return comp == 0; |
| 2712 | } |
| 2713 | |
| 2714 | ArrayIndex Value::CZString::index() const { return index_; } |
| 2715 |
nothing calls this directly
no test coverage detected