summaryrefslogtreecommitdiffstats
path: root/kig/misc/calcpaths.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kig/misc/calcpaths.cc')
-rw-r--r--kig/misc/calcpaths.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/kig/misc/calcpaths.cc b/kig/misc/calcpaths.cc
index 55787518..15dd9d98 100644
--- a/kig/misc/calcpaths.cc
+++ b/kig/misc/calcpaths.cc
@@ -124,7 +124,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os )
};
// now we know that if all objects appear at least once after all of
- // their tqparents. So, we take all, and of every object, we remove
+ // their parents. So, we take all, and of every object, we remove
// every reference except the last one...
std::vector<ObjectCalcer*> ret;
ret.reserve( os.size() );
@@ -182,9 +182,9 @@ static void addNonCache( ObjectCalcer* o, std::vector<ObjectCalcer*>& ret )
ret.push_back( o );
else
{
- std::vector<ObjectCalcer*> tqparents = o->tqparents();
- for ( uint i = 0; i < tqparents.size(); ++i )
- addNonCache( tqparents[i], ret );
+ std::vector<ObjectCalcer*> parents = o->parents();
+ for ( uint i = 0; i < parents.size(); ++i )
+ addNonCache( parents[i], ret );
};
}
@@ -196,13 +196,13 @@ static bool visit( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& from
// but their direct tqchildren do ), then we add them to ret.
if ( std::find( from.begin(), from.end(), o ) != from.end() ) return true;
- std::vector<bool> deps( o->tqparents().size(), false );
+ std::vector<bool> deps( o->parents().size(), false );
bool somedepend = false;
bool alldepend = true;
- std::vector<ObjectCalcer*> tqparents = o->tqparents();
- for ( uint i = 0; i < tqparents.size(); ++i )
+ std::vector<ObjectCalcer*> parents = o->parents();
+ for ( uint i = 0; i < parents.size(); ++i )
{
- bool v = visit( tqparents[i], from, ret );
+ bool v = visit( parents[i], from, ret );
somedepend |= v;
alldepend &= v;
deps[i] = v;
@@ -211,7 +211,7 @@ static bool visit( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& from
{
for ( uint i = 0; i < deps.size(); ++i )
if ( ! deps[i] )
- addNonCache( tqparents[i], ret );
+ addNonCache( parents[i], ret );
};
return somedepend;
@@ -234,8 +234,8 @@ std::vector<ObjectCalcer*> getAllParents( const std::vector<ObjectCalcer*>& objs
std::set<ObjectCalcer*> next;
for ( std::set<ObjectCalcer*>::const_iterator i = cur.begin(); i != cur.end(); ++i )
{
- std::vector<ObjectCalcer*> tqparents = (*i)->tqparents();
- next.insert( tqparents.begin(), tqparents.end() );
+ std::vector<ObjectCalcer*> parents = (*i)->parents();
+ next.insert( parents.begin(), parents.end() );
};
ret.insert( next.begin(), next.end() );
@@ -253,16 +253,16 @@ std::vector<ObjectCalcer*> getAllParents( ObjectCalcer* obj )
bool isChild( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& os )
{
- std::vector<ObjectCalcer*> tqparents = o->tqparents();
- std::set<ObjectCalcer*> cur( tqparents.begin(), tqparents.end() );
+ std::vector<ObjectCalcer*> parents = o->parents();
+ std::set<ObjectCalcer*> cur( parents.begin(), parents.end() );
while ( ! cur.empty() )
{
std::set<ObjectCalcer*> next;
for ( std::set<ObjectCalcer*>::const_iterator i = cur.begin(); i != cur.end(); ++i )
{
if ( std::find( os.begin(), os.end(), *i ) != os.end() ) return true;
- std::vector<ObjectCalcer*> tqparents = (*i)->tqparents();
- next.insert( tqparents.begin(), tqparents.end() );
+ std::vector<ObjectCalcer*> parents = (*i)->parents();
+ next.insert( parents.begin(), parents.end() );
};
cur = next;
};