Commit 99bc9d291d04c285331a416a5f1b5863f8adddd9
1 parent
dee93d1d
Simplify Transform::fromAlgorithm slightly
Showing
1 changed file
with
1 additions
and
4 deletions
openbr/core/core.cpp
| @@ -735,10 +735,7 @@ QSharedPointer<br::Transform> br::Transform::fromAlgorithm(const QString &algori | @@ -735,10 +735,7 @@ QSharedPointer<br::Transform> br::Transform::fromAlgorithm(const QString &algori | ||
| 735 | return AlgorithmManager::getAlgorithm(algorithm)->transform; | 735 | return AlgorithmManager::getAlgorithm(algorithm)->transform; |
| 736 | else { | 736 | else { |
| 737 | QSharedPointer<Transform> orig_tform = AlgorithmManager::getAlgorithm(algorithm)->transform; | 737 | QSharedPointer<Transform> orig_tform = AlgorithmManager::getAlgorithm(algorithm)->transform; |
| 738 | - QSharedPointer<Transform> newRoot = QSharedPointer<Transform>(Transform::make("Stream(readMode=DistributeFrames)", NULL)); | ||
| 739 | - WrapperTransform *downcast = dynamic_cast<WrapperTransform *> (newRoot.data()); | ||
| 740 | - downcast->transform = orig_tform.data(); | ||
| 741 | - downcast->init(); | 738 | + QSharedPointer<Transform> newRoot(wrapTransform(orig_tform.data(), "Stream(readMode=DistributeFrames)")); |
| 742 | return newRoot; | 739 | return newRoot; |
| 743 | } | 740 | } |
| 744 | } | 741 | } |