From 05b5171229d840b8b120a1e5b765128973270584 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 18 Sep 2014 08:49:07 +0200 Subject: -Wall -Wextra, no functional changes --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 10 ++++------ ftnoir_protocol_sc/ftnoir_protocol_sc.h | 2 +- ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 5 ++--- ftnoir_tracker_pt/point_tracker.cpp | 20 ++++++++------------ 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index c53aa49c..1baeacd4 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -79,13 +79,11 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { if (!blnSimConnectActive) { if (SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) { - HRESULT hr; - simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame"); - hr = simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); - hr = simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); - hr = simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST); + simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); + simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); + simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST); blnSimConnectActive = true; } } @@ -203,7 +201,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK() return true; } -void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext) +void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD, void *) { switch(pData->dwID) { diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index d6185428..c60f6d85 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -133,7 +133,7 @@ class SCControls: public QWidget, public IProtocolDialog Q_OBJECT public: SCControls(); - void registerProtocol(IProtocol *protocol) {} + void registerProtocol(IProtocol *) {} void unRegisterProtocol() {} private: Ui::UICSCControls ui; diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 0e95f57d..63a3a8b5 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -5,10 +5,9 @@ FTNoIR_Tracker::FTNoIR_Tracker() : g_pDI(nullptr), g_pJoystick(nullptr), - iter(-1), - mtx(QMutex::Recursive) + mtx(QMutex::Recursive), + iter(-1) { - GUID bar = {0}; } void FTNoIR_Tracker::reload() diff --git a/ftnoir_tracker_pt/point_tracker.cpp b/ftnoir_tracker_pt/point_tracker.cpp index 5735c081..f83ff437 100644 --- a/ftnoir_tracker_pt/point_tracker.cpp +++ b/ftnoir_tracker_pt/point_tracker.cpp @@ -79,13 +79,9 @@ void PointModel::get_d_order(const std::vector& points, int d_order[] { // get sort indices with respect to d scalar product vector< pair > d_vals; - for (int i = 0; i(d.dot(points[i]), i)); - struct - { - bool operator()(const pair& a, const pair& b) { return a.first < b.first; } - } comp; std::sort(d_vals.begin(), d_vals.end(), #ifdef OPENTRACK_API @@ -95,19 +91,19 @@ void PointModel::get_d_order(const std::vector& points, int d_order[] #endif ); - for (int i = 0; i& points, float f, float dt) return false; } - int n_iter = POSIT(f); + (void) POSIT(f); //qDebug()<<"Number of POSIT iterations: "<