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

CustomVideoManager: Use qobject_cast

qobject_cast is times faster then dynamic_cast for objects
that inherit QObject. also, use auto keyword to not repeat
the class name
parent 42ad3de7
......@@ -26,7 +26,7 @@ CustomVideoManager::_updateSettings()
return;
//-- Check encoding
if(_activeVehicle && _activeVehicle->dynamicCameras()) {
CustomCameraControl* pCamera = dynamic_cast<CustomCameraControl*>(_activeVehicle->dynamicCameras()->currentCameraInstance());
auto* pCamera = qobject_cast<CustomCameraControl*>(_activeVehicle->dynamicCameras()->currentCameraInstance());
if(pCamera) {
Fact *fact = pCamera->videoEncoding();
if (fact) {
......
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