aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-02-02 09:43:51 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:13:53 -0300
commit1c412be5beb35445d2aa985a052b89e74184cb64 (patch)
tree5e5bf028a992e84a2c60e51405c94e3aee8ee750 /libshiboken
parent315ed272511b2d8cd6bfa61979cffbfb1fc64b5a (diff)
Replaced use from QList to QSet in children list.
Patch from farsmo <farsmo@sogetthis.com> Reviewer: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp4
-rw-r--r--libshiboken/basewrapper_p.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 0fbd3b161..fe575da6d 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -616,7 +616,7 @@ static void _destroyParentInfo(SbkObject* obj, bool keepReference)
ParentInfo* pInfo = obj->d->parentInfo;
if (pInfo) {
while(!pInfo->children.empty()) {
- SbkObject* first = pInfo->children.front();
+ SbkObject* first = *pInfo->children.begin();
// Mark child as invalid
Shiboken::Object::invalidate(first);
removeParent(first, false, keepReference);
@@ -942,7 +942,7 @@ void setParent(PyObject* parent, PyObject* child)
pInfo = child_->d->parentInfo = new ParentInfo;
pInfo->parent = parent_;
- parent_->d->parentInfo->children.push_back(child_);
+ parent_->d->parentInfo->children.insert(child_);
// Add Parent ref
Py_INCREF(child_);
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index d738dac5c..e9a067a6e 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -40,7 +40,7 @@ typedef std::map<std::string, std::list<SbkObject*> > RefCountMap;
/// Linked list of SbkBaseWrapper pointers
-typedef std::list<SbkObject*> ChildrenList;
+typedef std::set<SbkObject*> ChildrenList;
/// Struct used to store information about object parent and children.
struct ParentInfo