| 438 | } |
| 439 | |
| 440 | bool ByteQueue::operator==(const ByteQueue &rhs) const |
| 441 | { |
| 442 | const lword currentSize = CurrentSize(); |
| 443 | |
| 444 | if (currentSize != rhs.CurrentSize()) |
| 445 | return false; |
| 446 | |
| 447 | Walker walker1(*this), walker2(rhs); |
| 448 | byte b1, b2; |
| 449 | |
| 450 | while (walker1.Get(b1) && walker2.Get(b2)) |
| 451 | if (b1 != b2) |
| 452 | return false; |
| 453 | |
| 454 | return true; |
| 455 | } |
| 456 | |
| 457 | byte ByteQueue::operator[](lword i) const |
| 458 | { |