diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-05-20 21:31:46 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-05-20 21:31:46 -0400 |
commit | f0ebc4ff3243eb697a632052436806e650296916 (patch) | |
tree | 27c28cb99019904725c974c284e22b120162505e /sigmodr/tree/TreeModel.cpp | |
parent | 8169dccd2abb9f9ea8c79f76fcbd6fe9476610a0 (diff) | |
download | sigen-f0ebc4ff3243eb697a632052436806e650296916.tar.gz sigen-f0ebc4ff3243eb697a632052436806e650296916.tar.xz sigen-f0ebc4ff3243eb697a632052436806e650296916.zip |
Condense the children checking
Diffstat (limited to 'sigmodr/tree/TreeModel.cpp')
-rw-r--r-- | sigmodr/tree/TreeModel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sigmodr/tree/TreeModel.cpp b/sigmodr/tree/TreeModel.cpp index 36eb5055..ff7426bd 100644 --- a/sigmodr/tree/TreeModel.cpp +++ b/sigmodr/tree/TreeModel.cpp @@ -95,8 +95,7 @@ bool TreeModel::hasChildren(const QModelIndex& parent) const { if (!parent.isValid()) return false; - TreeItem* item = static_cast<TreeItem*>(parent.internalPointer()); - return (0 < item->childCount()); + return (0 < static_cast<TreeItem*>(parent.internalPointer())->childCount()); } int TreeModel::rowCount(const QModelIndex& parent) const |