[poincare] Fix TreeReference::setTo

This commit is contained in:
Léa Saviot
2018-07-12 17:26:28 +02:00
parent 8318a5cd3a
commit fca5a5c76f

View File

@@ -279,7 +279,9 @@ protected:
}
private:
void setTo(const TreeReference & tr) {
if (*this == tr) {
/* We cannot use (*this)==tr because tr would need to be casted to
* TreeReference<TreeNode>, which calls setTo and triggers an infinite loop */
if (identifier() == tr.identifier()) {
return;
}
TreeNode * currentNode = node();