From 78e7b38162d525923feb13c6b609ecf1a75847a9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 29 Oct 2013 07:31:46 +0100 Subject: move variable decls into inner scope Signed-off-by: Stanislaw Halik --- facetracknoir/tracker.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'facetracknoir') diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index eb6348ca..a91d9f58 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -62,18 +62,18 @@ static void get_curve(double pos, double& out, THeadPoseDOF& axis) { /** QThread run method @override **/ void Tracker::run() { - T6DOF offset_camera, new_camera, gameoutput_camera, target_camera, target_camera2; - + T6DOF offset_camera, gameoutput_camera; + bool bTracker1Confid = false; bool bTracker2Confid = false; - + double newpose[6] = {0}; double last_post_filter[6]; - + #if defined(_WIN32) (void) timeBeginPeriod(1); #endif - + for (;;) { if (should_quit) @@ -88,6 +88,7 @@ void Tracker::run() { } { + T6DOF target_camera; QMutexLocker foo(&mtx); const bool confid = bTracker1Confid || bTracker2Confid; @@ -106,6 +107,8 @@ void Tracker::run() { Libraries->pFilter->Initialize(); } + T6DOF target_camera2, new_camera; + if (enabled && confid) { for (int i = 0; i < 6; i++) @@ -164,7 +167,7 @@ void Tracker::run() { Libraries->pProtocol->sendHeadposeToGame( gameoutput_camera.axes ); // degrees & centimeters } } - + msleep(15); } #if defined(_WIN32) -- cgit v1.2.3