From f0ebc4ff3243eb697a632052436806e650296916 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 20 May 2009 21:31:46 -0400 Subject: Condense the children checking --- sigmodr/tree/TreeModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sigmodr/tree/TreeModel.cpp') 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(parent.internalPointer()); - return (0 < item->childCount()); + return (0 < static_cast(parent.internalPointer())->childCount()); } int TreeModel::rowCount(const QModelIndex& parent) const -- cgit