From 463737c1b50246c56a67c35c1116732006348593 Mon Sep 17 00:00:00 2001
From: Stanislaw Halik <sthalik@misaki.pl>
Date: Fri, 13 Sep 2013 16:20:25 +0200
Subject: Don't expose filter internal state. Sprinkle some const

---
 ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp | 5 ++---
 ftnoir_filter_ewma2/ftnoir_filter_ewma2.h   | 7 +++----
 2 files changed, 5 insertions(+), 7 deletions(-)

(limited to 'ftnoir_filter_ewma2')

diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
index 43cfd102..11af77f7 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
@@ -79,10 +79,9 @@ void FTNoIR_Filter::loadSettings() {
     iniFile.endGroup ();
 }
 
-void FTNoIR_Filter::FilterHeadPoseData(double *current_camera_position,
-                                       double *target_camera_position,
+void FTNoIR_Filter::FilterHeadPoseData(const double *target_camera_position,
                                        double *new_camera_position,
-                                       double *last_post_filter)
+                                       const double *last_post_filter)
 {
     double delta;
     double new_alpha;
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
index 18fec8d4..e3a264be 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
@@ -44,10 +44,9 @@ public:
     ~FTNoIR_Filter();
     void Initialize() {}
 
-    void FilterHeadPoseData(double *current_camera_position,
-                            double *target_camera_position,
+    void FilterHeadPoseData(const double *target_camera_position,
                             double *new_camera_position,
-                            double *last_post_filter);
+                            const double *last_post_filter);
     void receiveSettings(double smin, double smax, double sexpt);
 
 private:
@@ -61,7 +60,7 @@ private:
     double kMinSmoothing;
     double kMaxSmoothing;
     double kSmoothingScaleCurve;
-    
+    double current_camera_position[6];
     QMutex mutex;
 };
 
-- 
cgit v1.2.3