From d49440889c973a14002fb47dfa0206ca9422ae54 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Thu, 18 May 2006 14:15:38 +0000 Subject: [PATCH] added missing operator= to ObjectsArray --- src/common/classes/objects_array.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/common/classes/objects_array.h b/src/common/classes/objects_array.h index 69f688a5c8..80774b8ac8 100644 --- a/src/common/classes/objects_array.h +++ b/src/common/classes/objects_array.h @@ -252,6 +252,25 @@ namespace Firebird } inherited::clear(); } + ObjectsArray& operator =(const ObjectsArray& L) + { + while (count > L.count) + { + delete inherited::pop(); + } + for (size_t i = 0; i < L.count; i++) + { + if (i < count) + { + (*this)[i] = L[i]; + } + else + { + add(L[i]); + } + } + return *this; + } }; // Template to convert object value to index directly