| 205 | |
| 206 | bool StartArray() { return true; } |
| 207 | bool EndArray(SizeType elementCount) { |
| 208 | uint64_t h = Hash(0, kArrayType); |
| 209 | uint64_t* e = stack_.template Pop<uint64_t>(elementCount); |
| 210 | for (SizeType i = 0; i < elementCount; i++) |
| 211 | h = Hash(h, e[i]); // Use hash to achieve element order sensitive |
| 212 | *stack_.template Push<uint64_t>() = h; |
| 213 | return true; |
| 214 | } |
| 215 | |
| 216 | bool IsValid() const { return stack_.GetSize() == sizeof(uint64_t); } |
| 217 |