From 78b970a0a036f78cfd491553b49ffa00214f7a64 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Tue, 29 Jul 2008 14:51:39 +0000 Subject: Rename isLPEParam() to isDeletable(), create new class LPEKnotHolderEntity and make inheritance from it a bit less clumsy (bzr r6448) --- src/knotholder.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/knotholder.cpp') diff --git a/src/knotholder.cpp b/src/knotholder.cpp index f2bbbfbc0..ae9737b32 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -60,17 +60,16 @@ KnotHolder::~KnotHolder() { g_object_unref(G_OBJECT(item)); for(std::list::iterator i = entity.begin(); i != entity.end(); ++i) { KnotHolderEntity* e = (*i); - if (!e->isLPEParam()) { - // knotholder entity may be deleted + if (e->isDeletable()) { delete (*i); } else { - // we must not delete the entity since it's an LPE parameter, + // we must not delete the entity (since it's attached to an LPE parameter), // but the handle should be destroyed g_object_unref(e->knot); } (*i) = NULL; } - entity.clear(); // this shouldn't be necessary, though + entity.clear(); // is this necessary? } /** -- cgit v1.2.3