ModelEditor: Avoid temporary extensive copy

Change-Id: I8e77ea98e4e3c6086c3dd8a424da6dfd3f95a0fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jochen Becher
2018-01-13 19:35:16 +01:00
parent 59a01d9a1d
commit 85fbd5a366
4 changed files with 10 additions and 10 deletions

View File

@@ -344,7 +344,7 @@ bool UpdateIncludeDependenciesVisitor::haveDependency(const qmt::MObject *source
aToB = qmt::MDependency::BToA;
bToA = qmt::MDependency::AToB;
}
foreach (const qmt::Handle<qmt::MRelation> &handle, source->relations()) {
for (const qmt::Handle<qmt::MRelation> &handle : source->relations()) {
if (auto dependency = dynamic_cast<qmt::MDependency *>(handle.target())) {
if (dependency->source() == source->uid()
&& dependency->target() == target->uid()