fix c style casting (#2561)

This commit is contained in:
Zach H 2017-04-05 15:45:58 -04:00 committed by GitHub
parent ee154da598
commit 657e1ac9e6
8 changed files with 10 additions and 16 deletions

View file

@ -25,9 +25,7 @@ int FilterTreeBranch<T>::childIndex(const FilterTreeNode *node) const
FilterTreeNode *unconst;
T downcasted;
/* to do the dynamic cast to T we will lose const'ness, but we can
* trust QList::indexOf */
unconst = (FilterTreeNode *) node;
unconst = const_cast<FilterTreeNode *>(node);
downcasted = dynamic_cast<T>(unconst);
if (downcasted == NULL)
return -1;