From 99bc9d291d04c285331a416a5f1b5863f8adddd9 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Mon, 14 Jul 2014 14:44:17 -0400 Subject: [PATCH] Simplify Transform::fromAlgorithm slightly --- openbr/core/core.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openbr/core/core.cpp b/openbr/core/core.cpp index 6fa98d8..7fdaf59 100644 --- a/openbr/core/core.cpp +++ b/openbr/core/core.cpp @@ -735,10 +735,7 @@ QSharedPointer br::Transform::fromAlgorithm(const QString &algori return AlgorithmManager::getAlgorithm(algorithm)->transform; else { QSharedPointer orig_tform = AlgorithmManager::getAlgorithm(algorithm)->transform; - QSharedPointer newRoot = QSharedPointer(Transform::make("Stream(readMode=DistributeFrames)", NULL)); - WrapperTransform *downcast = dynamic_cast (newRoot.data()); - downcast->transform = orig_tform.data(); - downcast->init(); + QSharedPointer newRoot(wrapTransform(orig_tform.data(), "Stream(readMode=DistributeFrames)")); return newRoot; } } -- libgit2 0.21.4