switched many QLists for QVectors
Minor optimization
This commit is contained in:
@@ -21,7 +21,7 @@ bool NodeTreeView::IsInputEnabled(NodeInput *i) const
|
||||
return !disabled_inputs_.contains(i);
|
||||
}
|
||||
|
||||
void NodeTreeView::SetNodes(const QList<Node *> &nodes)
|
||||
void NodeTreeView::SetNodes(const QVector<Node *> &nodes)
|
||||
{
|
||||
nodes_ = nodes;
|
||||
|
||||
@@ -34,7 +34,7 @@ void NodeTreeView::SetNodes(const QList<Node *> &nodes)
|
||||
node_item->setData(0, kItemType, kItemTypeNode);
|
||||
node_item->setData(0, kItemPointer, reinterpret_cast<quintptr>(n));
|
||||
|
||||
QList<NodeInput*> inputs = n->GetInputsIncludingArrays();
|
||||
QVector<NodeInput*> inputs = n->GetInputsIncludingArrays();
|
||||
foreach (NodeInput* i, inputs) {
|
||||
if (only_show_keyframable_ && !i->is_keyframable()) {
|
||||
continue;
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
}
|
||||
|
||||
public slots:
|
||||
void SetNodes(const QList<Node*>& nodes);
|
||||
void SetNodes(const QVector<Node *> &nodes);
|
||||
|
||||
signals:
|
||||
void NodeEnableChanged(Node* n, bool e);
|
||||
@@ -44,11 +44,11 @@ private:
|
||||
static const int kItemType = Qt::UserRole;
|
||||
static const int kItemPointer = Qt::UserRole + 1;
|
||||
|
||||
QList<Node*> nodes_;
|
||||
QVector<Node*> nodes_;
|
||||
|
||||
QList<Node*> disabled_nodes_;
|
||||
QVector<Node*> disabled_nodes_;
|
||||
|
||||
QList<NodeInput*> disabled_inputs_;
|
||||
QVector<NodeInput*> disabled_inputs_;
|
||||
|
||||
bool only_show_keyframable_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user