summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 18:54:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:32:10 +0100
commita88e34b21b07f70123926fcb5c505d6afdf99807 (patch)
tree905059194dcc64c7c163b8912947d8173fd4cc91 /compat
parent5bf85412e4eacf92acc936b6e74bce0e2b1055d9 (diff)
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
Diffstat (limited to 'compat')
-rw-r--r--compat/correlation-calibrator.cpp6
1 files changed, 4 insertions, 2 deletions
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