diff --git a/ApplicationComponents/SensorWidget/lqSensorListWidget.cxx b/ApplicationComponents/SensorWidget/lqSensorListWidget.cxx index 3b4c15ca61d6a7d94ce97f8d5382f2c82282676b..8fa35dceaf6c267e8f5ecce5d8c9fcff73f2b19e 100644 --- a/ApplicationComponents/SensorWidget/lqSensorListWidget.cxx +++ b/ApplicationComponents/SensorWidget/lqSensorListWidget.cxx @@ -399,7 +399,7 @@ vtkSMProxy* lqSensorListWidget::getTrailingFrame() Q_FOREACH(pqPipelineSource* src, lidar->getOutputPort(0)->getConsumers()) { vtkSMProxy* proxy = src->getProxy(); - if( IsProxy<vtkTrailingFrame *>(proxy) ) + if( IsProxy<vtkTrailingFrame>(proxy) ) { return proxy; } diff --git a/ApplicationComponents/lqHelper.cxx b/ApplicationComponents/lqHelper.cxx index e6120234e3cce8c40e4c0a1976368f97731881bd..7dfaa4c8fadc5cc0545ee9ba919780afc7989c1c 100644 --- a/ApplicationComponents/lqHelper.cxx +++ b/ApplicationComponents/lqHelper.cxx @@ -62,25 +62,25 @@ bool IsPositionOrientationProxy(vtkSMProxy * proxy) //----------------------------------------------------------------------------- bool IsLidarReaderProxy(vtkSMProxy * proxy) { - return IsProxy<vtkLidarReader *>(proxy); + return IsProxy<vtkLidarReader>(proxy); } //----------------------------------------------------------------------------- bool IsLidarStreamProxy(vtkSMProxy * proxy) { - return IsProxy<vtkLidarStream *>(proxy); + return IsProxy<vtkLidarStream>(proxy); } //----------------------------------------------------------------------------- bool IsPositionOrientationReaderProxy(vtkSMProxy * proxy) { - return IsProxy<vtkPositionOrientationPacketReader *>(proxy); + return IsProxy<vtkPositionOrientationPacketReader>(proxy); } //----------------------------------------------------------------------------- bool IsPositionOrientationStreamProxy(vtkSMProxy * proxy) { - return IsProxy<vtkPositionOrientationStream *>(proxy); + return IsProxy<vtkPositionOrientationStream>(proxy); } //----------------------------------------------------------------------------- diff --git a/ApplicationComponents/lqHelper.h b/ApplicationComponents/lqHelper.h index 2632ee49beb0966f70fd12972071377d80c4b22f..ec4affe1ec7ba72e3dc79bd2961b0a21ae909275 100644 --- a/ApplicationComponents/lqHelper.h +++ b/ApplicationComponents/lqHelper.h @@ -191,7 +191,7 @@ bool IsProxy(vtkSMProxy * proxy) { if(proxy != nullptr) { - auto* tmp_objProxy= dynamic_cast<T> (proxy->GetClientSideObject()); + auto* tmp_objProxy= T::SafeDownCast(proxy->GetClientSideObject()); if (tmp_objProxy) { return true; @@ -216,7 +216,7 @@ std::vector<vtkSMProxy*> GetProxies() } foreach (pqPipelineSource* src, smmodel->findItems<pqPipelineSource*>()) { - if(IsProxy<T*>(src->getProxy())) + if(IsProxy<T>(src->getProxy())) { proxys.push_back(src->getProxy()); } diff --git a/ApplicationComponents/lqLidarCoreManager.cxx b/ApplicationComponents/lqLidarCoreManager.cxx index b8b9833f96ca91766494a554f5f25b6766398ba6..7ef73188f97c835f1c5f96c7e03880d565e78c2c 100644 --- a/ApplicationComponents/lqLidarCoreManager.cxx +++ b/ApplicationComponents/lqLidarCoreManager.cxx @@ -232,7 +232,7 @@ void lqLidarCoreManager::onMeasurementGrid(bool gridVisible) pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); foreach (pqPipelineSource* src, smmodel->findItems<pqPipelineSource*>()) { - if (IsProxy<vtkGridSource *>(src->getProxy())) + if (IsProxy<vtkGridSource>(src->getProxy())) { controller->SetVisibility( vtkSMSourceProxy::SafeDownCast(src->getProxy()), 0, diff --git a/ApplicationComponents/lqPlayerControlsController.cxx b/ApplicationComponents/lqPlayerControlsController.cxx index 41a251f3f5da06b5dce26f668c804b7c1fb582d2..fe076824ed7327469c1811d5c0b16c9afa6ad2d4 100644 --- a/ApplicationComponents/lqPlayerControlsController.cxx +++ b/ApplicationComponents/lqPlayerControlsController.cxx @@ -50,8 +50,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace { void SetProperty(QPointer<pqAnimationScene> scene, const char* property, int value) { - dynamic_cast<vtkSMIntVectorProperty*> - (scene->getProxy()->GetProperty(property))->SetElements1(value); + vtkSMIntVectorProperty::SafeDownCast(scene->getProxy()->GetProperty(property))->SetElements1(value); scene->getProxy()->UpdateProperty(property); } diff --git a/ApplicationComponents/lqStreamRecordReaction.cxx b/ApplicationComponents/lqStreamRecordReaction.cxx index bce083f9254ac98e6fec9d94e13f0897fae0de22..a871db61fe701b850882fa3ba610743ebcdf77cf 100644 --- a/ApplicationComponents/lqStreamRecordReaction.cxx +++ b/ApplicationComponents/lqStreamRecordReaction.cxx @@ -81,7 +81,7 @@ void lqStreamRecordReaction::StartRecordingReaction() pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); foreach (pqPipelineSource* src, smmodel->findItems<pqPipelineSource*>()) { - auto* tmp = dynamic_cast<vtkLidarStream*> (src->getProxy()->GetClientSideObject()); + auto* tmp = vtkLidarStream::SafeDownCast(src->getProxy()->GetClientSideObject()); if (tmp) { lidar = tmp; @@ -126,7 +126,7 @@ void lqStreamRecordReaction::StartRecordingReaction() // Tell vtkStreams to Start Recording foreach (pqPipelineSource* src, smmodel->findItems<pqPipelineSource*>()) { - auto* stream = dynamic_cast<vtkStream*> (src->getProxy()->GetClientSideObject()); + auto* stream = vtkStream::SafeDownCast(src->getProxy()->GetClientSideObject()); if(!stream){continue;} stream->StartRecording( // Multiple start is okay, it detects it this->recordingFilename.toStdString(), @@ -152,7 +152,7 @@ void lqStreamRecordReaction::StopRecordingReaction() pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); foreach (pqPipelineSource* src, smmodel->findItems<pqPipelineSource*>()) { - auto* stream = dynamic_cast<vtkStream*> (src->getProxy()->GetClientSideObject()); + auto* stream = vtkStream::SafeDownCast(src->getProxy()->GetClientSideObject()); if(!stream){continue;} stream->StopRecording(); }