Skip to content

Commit b7f3345

Browse files
fix sonar findings
1 parent 18283fd commit b7f3345

6 files changed

Lines changed: 3 additions & 39 deletions

File tree

numerical/analysis/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ target_sources(numerical.analysis PRIVATE
2525

2626
numerical_add_coverage_sources(numerical.analysis
2727
ConvolutionCorrelation.cpp
28-
Decibels.cpp
2928
FastFourierTransformRadix2Impl.cpp
3029
GoertzelAlgorithm.cpp
3130
PowerDensitySpectrum.cpp

numerical/analysis/Decibels.cpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

numerical/analysis/Decibels.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,4 @@ namespace analysis
4747
static_assert(std::is_floating_point_v<T>, "RippleDb supports floating-point types only");
4848
return ToDecibels(maxRatio) - ToDecibels(minRatio);
4949
}
50-
51-
#ifdef NUMERICAL_TOOLBOX_COVERAGE_BUILD
52-
extern template float ToDecibels<float>(float);
53-
extern template float FromDecibels<float>(float);
54-
extern template float AttenuationDb<float>(float, float);
55-
extern template float RippleDb<float>(float, float);
56-
#endif
5750
}

numerical/math/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ numerical_add_coverage_sources(numerical.math
3535
Matrix.cpp
3636
QNumber.cpp
3737
Quaternion.cpp
38-
StepResponseMetrics.cpp
3938
)
4039

4140
add_subdirectory(test)

numerical/math/StepResponseMetrics.cpp

Lines changed: 0 additions & 10 deletions
This file was deleted.

numerical/math/StepResponseMetrics.hpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ namespace math
1818
{
1919
static_assert(std::is_floating_point_v<T>, "RiseTime supports floating-point types only");
2020

21-
const T lo{ T{ 0.1 } * steady };
22-
const T hi{ T{ 0.9 } * steady };
21+
const T lo{ T{ 0.1f } * steady };
22+
const T hi{ T{ 0.9f } * steady };
2323

2424
std::size_t iLo{ 0 };
2525
bool foundLo{ false };
@@ -40,7 +40,7 @@ namespace math
4040
}
4141

4242
template<typename T, std::size_t Size>
43-
[[nodiscard]] OPTIMIZE_FOR_SPEED T SettlingTime(const Vector<T, Size>& response, T steady, T band = T{ 0.02 }, T dt = T{ 1 })
43+
[[nodiscard]] OPTIMIZE_FOR_SPEED T SettlingTime(const Vector<T, Size>& response, T steady, T band = T{ 0.02f }, T dt = T{ 1 })
4444
{
4545
static_assert(std::is_floating_point_v<T>, "SettlingTime supports floating-point types only");
4646

@@ -113,12 +113,4 @@ namespace math
113113
const T tailMean{ sum / static_cast<T>(TailSize) };
114114
return reference - tailMean;
115115
}
116-
117-
#ifdef NUMERICAL_TOOLBOX_COVERAGE_BUILD
118-
extern template float RiseTime<float, 64>(const Vector<float, 64>&, float, float);
119-
extern template float SettlingTime<float, 64>(const Vector<float, 64>&, float, float, float);
120-
extern template float PercentOvershoot<float, 64>(const Vector<float, 64>&, float);
121-
extern template float PeakTime<float, 64>(const Vector<float, 64>&, float);
122-
extern template float SteadyStateError<float, 64>(const Vector<float, 64>&, float);
123-
#endif
124116
}

0 commit comments

Comments
 (0)