Skip to content
Snippets Groups Projects
Commit ddff05ac authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

COMP: remove switch case

parent bbd1c919
No related branches found
No related tags found
No related merge requests found
......@@ -76,17 +76,14 @@ protected:
CoefficientVector GenerateCoefficients()
{
CoefficientVector coeff;
switch (DirectionOfTransformation)
if (DirectionOfTransformation == Wavelet::FORWARD)
{
case Wavelet::FORWARD:
this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
break;
case Wavelet::INVERSE:
this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
Superclass::GenerateInverseHighPassFilterFromLowPassFilter(coeff);
break;
default: // Here to prevent from compilation warnings
break;
this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
}
if (DirectionOfTransformation == Wavelet::INVERSE)
{
this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
Superclass::GenerateInverseHighPassFilterFromLowPassFilter(coeff);
}
Superclass::UpSamplingCoefficients(coeff);
......
......@@ -75,17 +75,14 @@ protected:
CoefficientVector GenerateCoefficients()
{
CoefficientVector coeff;
switch (DirectionOfTransformation)
if (DirectionOfTransformation == Wavelet::FORWARD)
{
case Wavelet::FORWARD:
this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
break;
case Wavelet::INVERSE:
}
if (DirectionOfTransformation == Wavelet::INVERSE)
{
this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
Superclass::GenerateInverseLowPassFilterFromHighPassFilter(coeff);
break;
default: // Here to prevent from compilation warnings
break;
}
Superclass::UpSamplingCoefficients(coeff);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment