From a88e34b21b07f70123926fcb5c505d6afdf99807 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Dec 2018 18:54:34 +0100 Subject: style/quality only No functional changes. - add `override' everywhere where missing - almost pass clang's `-Wweak-vtables' - avoid some float/double conversions - remove unused private members - make signedness conversions explicit - put stuff in right namespaces to aid analysis --- compat/correlation-calibrator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compat') diff --git a/compat/correlation-calibrator.cpp b/compat/correlation-calibrator.cpp index a58d31cd..7edbd22d 100644 --- a/compat/correlation-calibrator.cpp +++ b/compat/correlation-calibrator.cpp @@ -16,7 +16,7 @@ using std::fflush; #endif -using namespace correlation_calibrator_impl; +namespace correlation_calibrator_impl { static constexpr unsigned nbuckets[6] = { @@ -53,7 +53,7 @@ bool correlation_calibrator::check_buckets(const vec6& data) for (unsigned k = 0; k < 6; k++) { const double val = clamp(data[k], min[k], max[k]); - pos[k] = (val-min[k])/spacing[k]; + pos[k] = unsigned((val-min[k])/spacing[k]); if (pos[k] >= nbuckets[k]) { @@ -158,3 +158,5 @@ unsigned correlation_calibrator::sample_count() const { return data.size(); } + +} // ns correlation_calibrator_impl -- cgit v1.2.3