| 2960 | } |
| 2961 | |
| 2962 | bool Value::CZString::operator==(const CZString &other) const |
| 2963 | { |
| 2964 | if (!cstr_) |
| 2965 | return index_ == other.index_; |
| 2966 | // return strcmp(cstr_, other.cstr_) == 0; |
| 2967 | // Assume both are strings. |
| 2968 | unsigned this_len = this->storage_.length_; |
| 2969 | unsigned other_len = other.storage_.length_; |
| 2970 | if (this_len != other_len) |
| 2971 | return false; |
| 2972 | JSON_ASSERT(this->cstr_ && other.cstr_); |
| 2973 | int comp = memcmp(this->cstr_, other.cstr_, this_len); |
| 2974 | return comp == 0; |
| 2975 | } |
| 2976 | |
| 2977 | ArrayIndex Value::CZString::index() const { return index_; } |
| 2978 |
nothing calls this directly
no test coverage detected