summaryrefslogtreecommitdiff
path: root/src/context
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-04-09 16:25:32 +0000
committerMorgan Deters <mdeters@gmail.com>2010-04-09 16:25:32 +0000
commite390a4207d3858927354b3d4b40d540c00f8064c (patch)
tree589fd13ed8f6ba835cd79a2894092860b66b7696 /src/context
parentc3a6ff8c6e4a0c743cd33eb29931f837eeb2959e (diff)
added experimental "make lcov" target (it runs only unit tests); better coverage for util and context classes; implemented some output functionality that was missing; reclassified some tests white -> black or black -> public; other minor fixes
Diffstat (limited to 'src/context')
-rw-r--r--src/context/cdlist.h1
-rw-r--r--src/context/cdmap.h24
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback