summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/TreeModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-20 21:31:46 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-20 21:31:46 -0400
commitf0ebc4ff3243eb697a632052436806e650296916 (patch)
tree27c28cb99019904725c974c284e22b120162505e /sigmodr/tree/TreeModel.cpp
parent8169dccd2abb9f9ea8c79f76fcbd6fe9476610a0 (diff)
downloadsigen-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.cpp3
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