From 8aec2c52ec39e2f2e350acc8d09899821404951b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 5 Nov 2013 09:28:47 +0100 Subject: get rid of dubious cast Signed-off-by: Stanislaw Halik --- facetracknoir/facetracknoir.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'facetracknoir/facetracknoir.cpp') diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index ef470c7a..fc4aac51 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -410,12 +410,17 @@ void FaceTrackNoIR::loadSettings() { } } + CurveConfigurationDialog* ccd = nullptr; + if (!_curve_config) { - _curve_config = new CurveConfigurationDialog( this, this ); + ccd = new CurveConfigurationDialog( this, this ); + _curve_config = ccd; + } else { + ccd = dynamic_cast(_curve_config); } - ((CurveConfigurationDialog*)_curve_config)->loadSettings(); + ccd->loadSettings(); looping = false; } -- cgit v1.2.3