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: ...@@ -76,17 +76,14 @@ protected:
CoefficientVector GenerateCoefficients() CoefficientVector GenerateCoefficients()
{ {
CoefficientVector coeff; CoefficientVector coeff;
switch (DirectionOfTransformation) if (DirectionOfTransformation == Wavelet::FORWARD)
{ {
case Wavelet::FORWARD: this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff); }
break; if (DirectionOfTransformation == Wavelet::INVERSE)
case Wavelet::INVERSE: {
this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff); this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
Superclass::GenerateInverseHighPassFilterFromLowPassFilter(coeff); Superclass::GenerateInverseHighPassFilterFromLowPassFilter(coeff);
break;
default: // Here to prevent from compilation warnings
break;
} }
Superclass::UpSamplingCoefficients(coeff); Superclass::UpSamplingCoefficients(coeff);
......
...@@ -75,17 +75,14 @@ protected: ...@@ -75,17 +75,14 @@ protected:
CoefficientVector GenerateCoefficients() CoefficientVector GenerateCoefficients()
{ {
CoefficientVector coeff; CoefficientVector coeff;
switch (DirectionOfTransformation) if (DirectionOfTransformation == Wavelet::FORWARD)
{ {
case Wavelet::FORWARD:
this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff); this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
break; }
case Wavelet::INVERSE: if (DirectionOfTransformation == Wavelet::INVERSE)
{
this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff); this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
Superclass::GenerateInverseLowPassFilterFromHighPassFilter(coeff); Superclass::GenerateInverseLowPassFilterFromHighPassFilter(coeff);
break;
default: // Here to prevent from compilation warnings
break;
} }
Superclass::UpSamplingCoefficients(coeff); 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