diff options
Diffstat (limited to 'Database/internals/database-references.cpp')
-rw-r--r-- | Database/internals/database-references.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Database/internals/database-references.cpp b/Database/internals/database-references.cpp index c138698..30841bf 100644 --- a/Database/internals/database-references.cpp +++ b/Database/internals/database-references.cpp @@ -1,12 +1,15 @@ +#include <assert.h> + #include "database-references.h" +#include "database.h" RefFrom::RefFrom(RefTo * refTo, SegmentRefData * data) : refTo(refTo), data(data) { - assert(refto); + assert(refTo); assert(data); next = data->getRefFrom(); prev = 0; - data->firstRefFrom = this; + data->setFirstRefFrom(this); if (next) next->prev = this; } @@ -24,7 +27,7 @@ RefTo::RefTo(absolute_ptr ptr, SegmentRefData * data, Database * database) : dat assert(database); Segment * destSeg = database->getSegment(ptr.segment_id); assert(destSeg); - refFrom = new RefFrom(this, destSeg->getSegmentRefData(ptr.ptr); + refFrom = new RefFrom(this, destSeg->getSegmentRefData(ptr.ptr)); RefTo * t = data->getRefTo(); if (t) { @@ -34,7 +37,7 @@ RefTo::RefTo(absolute_ptr ptr, SegmentRefData * data, Database * database) : dat } RefTo::~RefTo() { - data->refTo = 0; + data->setRefTo(0); delete refFrom; } |