summaryrefslogtreecommitdiff
path: root/src/generic/problemresolver/incremental_expression.h
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2009-05-22 07:55:08 -0700
committerDaniel Burrows <dburrows@debian.org>2009-05-22 07:55:08 -0700
commit3232cd164d24850123a0c231455c6efa691edba3 (patch)
tree8eb1b38d91351c48f8746e0f523b3f032d4e2aba /src/generic/problemresolver/incremental_expression.h
parent2bcd823b63961299d0dd4724cfc731b5379760f8 (diff)
downloadaptitude-3232cd164d24850123a0c231455c6efa691edba3.tar.gz
Actually, take raw pointers in add_parent().
The reason here is that this will be invoked from constructors, which can't have smart pointers since the object isn't created yet.
Diffstat (limited to 'src/generic/problemresolver/incremental_expression.h')
-rw-r--r--src/generic/problemresolver/incremental_expression.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/generic/problemresolver/incremental_expression.h b/src/generic/problemresolver/incremental_expression.h
index 4d77dcbb..2435f55d 100644
--- a/src/generic/problemresolver/incremental_expression.h
+++ b/src/generic/problemresolver/incremental_expression.h
@@ -192,9 +192,10 @@ public:
// Add a weak reference to the given expression; its
// child_modified() routine will be invoked when this child's value
// changes.
- void add_parent(const cwidget::util::ref_ptr<expression_container<T> > &parent)
+ void add_parent(expression_container<T> *parent)
{
- parents.push_back(parent);
+ if(parent != NULL)
+ parents.push_back(parent);
}
virtual T get_value() = 0;