diff options
Diffstat (limited to 'raul/Array.hpp')
-rw-r--r-- | raul/Array.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/raul/Array.hpp b/raul/Array.hpp index 5ba57a5..cac993d 100644 --- a/raul/Array.hpp +++ b/raul/Array.hpp @@ -67,6 +67,10 @@ public: Array<T>& operator=(const Array<T>& array) { + if (&array == this) { + return *this; + } + _size = array._size; _elems = _size ? new T[_size] : nullptr; |