| 61 | } |
| 62 | |
| 63 | bool ValueArray::operator==(const ValueArray& other) const { |
| 64 | if (&other == this) { |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | if (size() != other.size()) { |
| 69 | return false; |
| 70 | } |
| 71 | |
| 72 | const auto* it = begin(); |
| 73 | const auto* otherIt = other.begin(); |
| 74 | |
| 75 | while (it != end()) { |
| 76 | if (*it != *otherIt) { |
| 77 | return false; |
| 78 | } |
| 79 | ++it; |
| 80 | ++otherIt; |
| 81 | } |
| 82 | |
| 83 | return true; |
| 84 | } |
| 85 | |
| 86 | bool ValueArray::empty() const { |
| 87 | return _size == 0; |