Fix limits for pipe.

This commit is contained in:
Nikolai Kochetov 2019-11-06 14:36:33 +03:00
parent 86a9c2b98e
commit a34023192d

View File

@ -92,7 +92,7 @@ void Pipe::setLimits(const ISourceWithProgress::LocalLimits & limits)
{ {
for (auto & processor : processors) for (auto & processor : processors)
{ {
if (auto * source_with_progress = typeid_cast<ISourceWithProgress *>(processor.get())) if (auto * source_with_progress = dynamic_cast<ISourceWithProgress *>(processor.get()))
source_with_progress->setLimits(limits); source_with_progress->setLimits(limits);
} }
} }
@ -101,7 +101,7 @@ void Pipe::setQuota(QuotaForIntervals & quota)
{ {
for (auto & processor : processors) for (auto & processor : processors)
{ {
if (auto * source_with_progress = typeid_cast<ISourceWithProgress *>(processor.get())) if (auto * source_with_progress = dynamic_cast<ISourceWithProgress *>(processor.get()))
source_with_progress->setQuota(quota); source_with_progress->setQuota(quota);
} }
} }
@ -110,7 +110,7 @@ void Pipe::pinSources(size_t executor_number)
{ {
for (auto & processor : processors) for (auto & processor : processors)
{ {
if (auto * source = typeid_cast<ISource *>(processor.get())) if (auto * source = dynamic_cast<ISource *>(processor.get()))
source->setStream(executor_number); source->setStream(executor_number);
} }
} }