diff --git a/membuffer/membuffer.h b/membuffer/membuffer.h index 21ef016..dea0493 100644 --- a/membuffer/membuffer.h +++ b/membuffer/membuffer.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2012-2013, Tomasz Sowa + * Copyright (c) 2012-2021, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,8 +58,8 @@ public: { public: - bool operator==(const iterator & i); - bool operator!=(const iterator & i); + bool operator==(const iterator & i) const; + bool operator!=(const iterator & i) const; iterator & operator++(); // prefix ++ iterator operator++(int); // postfix ++ @@ -89,8 +89,8 @@ public: const_iterator & operator=(const const_iterator & i); const_iterator & operator=(const iterator & i); - bool operator==(const const_iterator & i); - bool operator!=(const const_iterator & i); + bool operator==(const const_iterator & i) const; + bool operator!=(const const_iterator & i) const; const_iterator & operator++(); // prefix ++ const_iterator operator++(int); // postfix ++ @@ -264,7 +264,7 @@ item_type & MemBuffer::iterator::operato template -bool MemBuffer::iterator::operator==(const iterator & i) +bool MemBuffer::iterator::operator==(const iterator & i) const { return mem_buffer == i.mem_buffer && dynamic_array_index == i.dynamic_array_index && @@ -273,7 +273,7 @@ bool MemBuffer::iterator::operator==(con template -bool MemBuffer::iterator::operator!=(const iterator & i) +bool MemBuffer::iterator::operator!=(const iterator & i) const { return mem_buffer != i.mem_buffer || dynamic_array_index != i.dynamic_array_index || @@ -422,7 +422,7 @@ item_type MemBuffer::const_iterator::ope template -bool MemBuffer::const_iterator::operator==(const const_iterator & i) +bool MemBuffer::const_iterator::operator==(const const_iterator & i) const { return mem_buffer == i.mem_buffer && dynamic_array_index == i.dynamic_array_index && @@ -431,7 +431,7 @@ bool MemBuffer::const_iterator::operator template -bool MemBuffer::const_iterator::operator!=(const const_iterator & i) +bool MemBuffer::const_iterator::operator!=(const const_iterator & i) const { return mem_buffer != i.mem_buffer || dynamic_array_index != i.dynamic_array_index ||