switched many QLists for QVectors

Minor optimization
This commit is contained in:
itsmattkc
2020-11-16 16:17:43 +11:00
parent a0fb1981b4
commit 1b9bf6d92c
80 changed files with 273 additions and 281 deletions
+2 -2
View File
@@ -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;
+4 -4
View File
@@ -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_;