mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
fix c style casting (#2561)
This commit is contained in:
parent
ee154da598
commit
657e1ac9e6
8 changed files with 10 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue