mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[poincare] Remove warning on unused variable
This commit is contained in:
@@ -65,9 +65,11 @@ public:
|
||||
|
||||
int numberOfNodes() const {
|
||||
int count = 0;
|
||||
AllPool nodes = const_cast<TreePool *>(this)->allNodes();
|
||||
for (TreeNode * t : nodes) {
|
||||
TreeNode * firstNode = first();
|
||||
TreeNode * lastNode = last();
|
||||
while (firstNode != lastNode) {
|
||||
count++;
|
||||
firstNode = firstNode->next();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -93,8 +93,11 @@ TreeNode * TreeNode::editableRootTree() {
|
||||
|
||||
int TreeNode::numberOfDescendants(bool includeSelf) const {
|
||||
int result = includeSelf ? 1 : 0;
|
||||
for (TreeNode * child : depthFirstChildren()) {
|
||||
TreeNode * nextSiblingNode = nextSibling();
|
||||
TreeNode * currentNode = next();
|
||||
while (currentNode != nextSiblingNode) {
|
||||
result++;
|
||||
currentNode = currentNode->next();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user