summaryrefslogtreecommitdiffhomepage
path: root/filter-ewma2
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-26 22:25:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:05:21 +0200
commitd65936200a2756e6619a109fa6fa673b91df802e (patch)
tree80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /filter-ewma2
parent4046773c41ee3c0f65840828ab983cfd13451c85 (diff)
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'filter-ewma2')
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2.cpp8
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/filter-ewma2/ftnoir_filter_ewma2.cpp b/filter-ewma2/ftnoir_filter_ewma2.cpp
index c79596ef..b29746a0 100644
--- a/filter-ewma2/ftnoir_filter_ewma2.cpp
+++ b/filter-ewma2/ftnoir_filter_ewma2.cpp
@@ -22,7 +22,7 @@
// to minSmooth at a rate controlled by the powCurve setting.
-ewma::ewma() : first_run(true)
+ewma::ewma()
{
}
@@ -48,10 +48,10 @@ void ewma::filter(const double *input, double *output)
double noise_alpha = dt/(dt + noise_RC);
// scale curve .01->1 where 1.0 is sqrt(norm_noise).
- const double smoothing_scale_curve = static_cast<slider_value>(s.kSmoothingScaleCurve);
+ const double smoothing_scale_curve = *s.kSmoothingScaleCurve;
// min/max smoothing .01->1
- const double min_smoothing = static_cast<slider_value>(s.kMinSmoothing);
- const double max_smoothing = std::fmax(min_smoothing, static_cast<slider_value>(s.kMaxSmoothing));
+ const double min_smoothing = *s.kMinSmoothing;
+ const double max_smoothing = std::fmax(min_smoothing, *s.kMaxSmoothing);
// Calculate the new camera position.
for (int i=0;i<6;i++)
diff --git a/filter-ewma2/ftnoir_filter_ewma2.h b/filter-ewma2/ftnoir_filter_ewma2.h
index fd7047e1..1cd30a6b 100644
--- a/filter-ewma2/ftnoir_filter_ewma2.h
+++ b/filter-ewma2/ftnoir_filter_ewma2.h
@@ -36,7 +36,7 @@ private:
double last_output[6];
Timer timer;
settings s;
- bool first_run;
+ bool first_run = true;
};
class dialog_ewma: public IFilterDialog