Commit baf44585 authored by Tomaz Canabrava's avatar Tomaz Canabrava Committed by Daniel Agar

UDPLink: Use qobject_cast instead of dynamic_cast

qobject_cast is times faster dynamic_cast for objects that
inherit QObject. also, use auto keyword to not duplicate
class names.
parent 3a51a34e
......@@ -396,7 +396,7 @@ void UDPConfiguration::copyFrom(LinkConfiguration *source)
void UDPConfiguration::_copyFrom(LinkConfiguration *source)
{
UDPConfiguration* usource = dynamic_cast<UDPConfiguration*>(source);
auto* usource = qobject_cast<UDPConfiguration*>(source);
if (usource) {
_localPort = usource->localPort();
_clearTargetHosts();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment