mirror of https://github.com/qt/qtgrpc.git
Avoid mixing const and non-const iterator
Fix the HandlersRegistry::findHandler function, avoid mixing const and non-const iterator. Change-Id: I81d6c1495850ad230db26c5f7af606ceca90a0d5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
b652dbc814
commit
90c34b291a
|
|
@ -39,7 +39,7 @@ struct HandlersRegistry
|
||||||
QtProtobufPrivate::SerializationHandler handler;
|
QtProtobufPrivate::SerializationHandler handler;
|
||||||
QReadLocker locker(&m_lock);
|
QReadLocker locker(&m_lock);
|
||||||
auto it = m_registry.constFind(type);
|
auto it = m_registry.constFind(type);
|
||||||
if (it != m_registry.end())
|
if (it != m_registry.constEnd())
|
||||||
handler = it.value();
|
handler = it.value();
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue