added operator= to RingBufferHistory<T>::Iterator

This commit is contained in:
wangyix 2014-07-10 10:21:03 -07:00
parent 37b60a63b2
commit 763cc26fa9

View file

@ -109,6 +109,12 @@ public:
public:
Iterator(T* buffer, int size, T* at) : _buffer(buffer), _bufferEnd(buffer+size), _at(at) {}
Iterator& operator=(const Iterator& other) {
_buffer = other._buffer;
_bufferEnd = other._bufferEnd;
_at = other._at;
}
bool operator==(const Iterator& rhs) { return _at == rhs._at; }
bool operator!=(const Iterator& rhs) { return _at != rhs._at; }
T& operator*() { return *_at; }