use std::map instead of QMap for the node connections

std::map gives us a reverse iterator which we need. QMap doesn't seem to.
This commit is contained in:
itsmattkc
2021-01-15 14:34:36 +11:00
parent b83677e319
commit 96c0921193
7 changed files with 49 additions and 49 deletions
+3 -3
View File
@@ -106,14 +106,14 @@ public:
emit DataTypeChanged(type);
}
const QMap<int, Node*>& edges() const
const std::map<int, Node*>& edges() const
{
return input_connections();
}
bool IsConnected(int element = -1) const
{
return input_connections().contains(element);
return input_connections().find(element) != input_connections().end();
}
/**
@@ -127,7 +127,7 @@ public:
Node* GetConnectedNode(int element = -1) const
{
return input_connections().value(element);
return input_connections().at(element);
}
bool IsConnectable() const