diff options
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/cdlist.h | 1 | ||||
-rw-r--r-- | src/context/cdmap.h | 24 |
2 files changed, 5 insertions, 20 deletions
diff --git a/src/context/cdlist.h b/src/context/cdlist.h index b0161c562..a2abc08d8 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -95,6 +95,7 @@ private: CDList(const CDList<T>& l) : ContextObj(l), d_list(NULL), + d_callDestructor(l.d_callDestructor), d_size(l.d_size), d_sizeAlloc(0) { } diff --git a/src/context/cdmap.h b/src/context/cdmap.h index 75f6eb2ae..4621d7fc5 100644 --- a/src/context/cdmap.h +++ b/src/context/cdmap.h @@ -140,24 +140,6 @@ public: } };/* class CDOmap<> */ -// Dummy subclass of ContextObj to serve as our data class -class CDMapData : public ContextObj { - // befriend CDMap<> so that it can allocate us - template <class Key, class Data, class HashFcn> - friend class CDMap; - - ContextObj* save(ContextMemoryManager* pCMM) { - return new(pCMM) CDMapData(*this); - } - - void restore(ContextObj* data) {} - -public: - - CDMapData(Context* context) : ContextObj(context) {} - CDMapData(const ContextObj& co) : ContextObj(co) {} - ~CDMapData() throw(AssertionException) { destroy(); } -}; /** * Generic templated class for a map which must be saved and restored @@ -181,11 +163,13 @@ class CDMap : public ContextObj { // Nothing to save; the elements take care of themselves virtual ContextObj* save(ContextMemoryManager* pCMM) { - return new(pCMM) CDMapData(*this); + Unreachable(); } // Similarly, nothing to restore - virtual void restore(ContextObj* data) {} + virtual void restore(ContextObj* data) { + Unreachable(); + } void emptyTrash() { //FIXME multithreading |