Permalink
Browse files

Cosmetics

  • Loading branch information...
1 parent 6e83051 commit aaae8344969506d2e98c34e91adebed1ddf5e5f5 Eoin Mcloughlin committed Oct 31, 2016
Showing with 9 additions and 13 deletions.
  1. +9 −13 plots.cpp
View
@@ -34,25 +34,21 @@ Plot* Plots::samplePlot(std::shared_ptr<AbstractSampleSource> source)
Plot* Plots::amplitudePlot(std::shared_ptr<AbstractSampleSource> source)
{
- typedef SampleSource<std::complex<float>> ss;
- std::shared_ptr<ss> cs = std::dynamic_pointer_cast<ss>(source);
- return new TracePlot(
- std::make_shared<AmplitudeDemod>(cs)
- );
+ typedef SampleSource<std::complex<float>> Source;
+ std::shared_ptr<Source> concrete = std::dynamic_pointer_cast<Source>(source);
+ return new TracePlot( std::make_shared<AmplitudeDemod>(concrete) );
}
Plot* Plots::frequencyPlot(std::shared_ptr<AbstractSampleSource> source)
{
- typedef SampleSource<std::complex<float>> ss;
- std::shared_ptr<ss> cs = std::dynamic_pointer_cast<ss>(source);
- return new TracePlot(
- std::make_shared<FrequencyDemod>(cs)
- );
+ typedef SampleSource<std::complex<float>> Source;
+ std::shared_ptr<Source> concrete = std::dynamic_pointer_cast<Source>(source);
+ return new TracePlot( std::make_shared<FrequencyDemod>( concrete ) );
}
Plot* Plots::thresholdPlot(std::shared_ptr<AbstractSampleSource> source)
{
- typedef SampleSource<float> ss;
- std::shared_ptr<ss> cs = std::dynamic_pointer_cast<ss>(source);
- return new TracePlot( std::make_shared<Threshold>( cs ) );
+ typedef SampleSource<float> Source;
+ std::shared_ptr<Source> concrete= std::dynamic_pointer_cast<Source>(source);
+ return new TracePlot( std::make_shared<Threshold>( concrete ) );
}

0 comments on commit aaae834

Please sign in to comment.