remove commented code and fix a warning
This commit is contained in:
parent
10ac7720f7
commit
0e01a51929
@ -84,14 +84,6 @@ CTNode::childSymbols (void) const
|
|||||||
void
|
void
|
||||||
CTNode::updateChildLevels (CTNode* n, unsigned level)
|
CTNode::updateChildLevels (CTNode* n, unsigned level)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
n->setLevel (level);
|
|
||||||
const CTChilds& childs = n->childs();
|
|
||||||
for (CTChilds::const_iterator chIt = childs.begin();
|
|
||||||
chIt != childs.end(); ++ chIt) {
|
|
||||||
updateChildLevels (*chIt, level + 1);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
CTNodes stack;
|
CTNodes stack;
|
||||||
stack.push_back (n);
|
stack.push_back (n);
|
||||||
n->setLevel (level);
|
n->setLevel (level);
|
||||||
@ -134,16 +126,6 @@ CTNode::copySubtree (const CTNode* root1)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return root2;
|
return root2;
|
||||||
/*
|
|
||||||
CTNode* newNode = new CTNode (*root1);
|
|
||||||
const CTChilds& childs = root1->childs();
|
|
||||||
newNode->childs().reserve (childs.size());
|
|
||||||
for (CTChilds::const_iterator chIt = childs.begin();
|
|
||||||
chIt != childs.end(); ++ chIt) {
|
|
||||||
newNode->childs().push_back ((copySubtree (*chIt)));
|
|
||||||
}
|
|
||||||
return newNode;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -329,9 +311,8 @@ ConstraintTree::join (ConstraintTree* ct, bool oneTwoOne)
|
|||||||
CTNodes::const_iterator appendIt = appendNodes.begin();
|
CTNodes::const_iterator appendIt = appendNodes.begin();
|
||||||
for (unsigned i = 0; i < tuples.size(); ++ i, ++ appendIt) {
|
for (unsigned i = 0; i < tuples.size(); ++ i, ++ appendIt) {
|
||||||
bool tupleFounded = join (root_, tuples[i], 0, *appendIt);
|
bool tupleFounded = join (root_, tuples[i], 0, *appendIt);
|
||||||
if (oneTwoOne) {
|
if (oneTwoOne && tupleFounded == false) {
|
||||||
assert (tupleFounded);
|
assert (false);
|
||||||
tupleFounded = true; // hack to avoid gcc warning
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,17 +403,6 @@ ConstraintTree::remove (const LogVarSet& X)
|
|||||||
bool
|
bool
|
||||||
ConstraintTree::ConstraintTree::isSingleton (LogVar X)
|
ConstraintTree::ConstraintTree::isSingleton (LogVar X)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
const CTNodes& nodes = getNodesAtLevel (getLevel (X));
|
|
||||||
Symbol symb = nodes.front()->symbol();
|
|
||||||
for (CTNodes::const_iterator it = nodes.begin();
|
|
||||||
it != nodes.end(); ++ it) {
|
|
||||||
if ((*it)->symbol() != symb) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
*/
|
|
||||||
Symbol symb;
|
Symbol symb;
|
||||||
unsigned level = getLevel (X);
|
unsigned level = getLevel (X);
|
||||||
CTNodes stack;
|
CTNodes stack;
|
||||||
@ -930,23 +900,6 @@ ConstraintTree::getNodesAtLevel (unsigned level) const
|
|||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
return { root_ };
|
return { root_ };
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
CTNodes nodes;
|
|
||||||
queue<CTNode*> queue;
|
|
||||||
queue.push (root_);
|
|
||||||
while (queue.empty() == false) {
|
|
||||||
CTNode* node = queue.front();
|
|
||||||
if (node->level() == level) {
|
|
||||||
nodes.push_back (node);
|
|
||||||
} else {
|
|
||||||
for (CTChilds::const_iterator chIt = node->childs().begin();
|
|
||||||
chIt != node->childs().end(); ++ chIt) {
|
|
||||||
queue.push (*chIt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
queue.pop();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
CTNodes stack;
|
CTNodes stack;
|
||||||
CTNodes nodes;
|
CTNodes nodes;
|
||||||
stack.push_back (root_);
|
stack.push_back (root_);
|
||||||
|
Reference in New Issue
Block a user