@@ -110,16 +110,16 @@ class Variable
110110 return oss.str ();
111111 }
112112
113- virtual void update (){};
113+ virtual void update () {};
114114};
115115
116116class Constant : public Variable
117117{
118118public:
119119 Constant (double dInitValue) :
120- Variable (dInitValue) {}
120+ Variable (dInitValue) { }
121121
122- virtual void setValue (double dValue) {}
122+ virtual void setValue (double dValue) { }
123123};
124124
125125class LimitedVariable : public Variable
@@ -131,7 +131,7 @@ class LimitedVariable : public Variable
131131public:
132132 LimitedVariable (double dInitValue, double dMinValue, double dMaxValue) :
133133 Variable (dInitValue), _dMinValue(dMinValue), _dMaxValue(dMaxValue)
134- {}
134+ { }
135135
136136 virtual void setValue (double dValue)
137137 {
@@ -158,7 +158,7 @@ class TriangleVariable : public LimitedVariable
158158
159159public:
160160 TriangleVariable (double dInitValue, double dDeltaValue, double dMinValue, double dMaxValue) :
161- LimitedVariable (dInitValue, dMinValue, dMaxValue), _dDeltaValue(dDeltaValue){};
161+ LimitedVariable (dInitValue, dMinValue, dMaxValue), _dDeltaValue(dDeltaValue) {};
162162
163163 virtual void update ()
164164 {
@@ -207,7 +207,7 @@ class VariableEffect
207207 VariableEffect (const char * pszDesc, Effect* pEffect, const MapVariables& mapVars, const EffectVariablesApplier pfApplyVars) :
208208 _pszDesc (pszDesc), _pEffect(pEffect),
209209 _mapVariables (mapVars), _pfApplyVariables(pfApplyVars), _bActive(false )
210- {}
210+ { }
211211
212212 ~VariableEffect ()
213213 {
@@ -459,7 +459,7 @@ void forceVariableApplier(MapVariables& mapVars, Effect* pEffect)
459459 ConstantEffect* pConstForce = dynamic_cast <ConstantEffect*>(pEffect->getForceEffect ());
460460 pConstForce->level = (int )dForce;
461461 pConstForce->envelope .attackLevel = (unsigned short )fabs (dForce * dAttackFactor);
462- pConstForce->envelope .fadeLevel = (unsigned short )fabs (dForce); // Fade never reached, in fact.
462+ pConstForce->envelope .fadeLevel = (unsigned short )fabs (dForce); // Fade never reached, in fact.
463463}
464464
465465// Variable "Period" on an OIS::PeriodicEffect
@@ -535,17 +535,17 @@ class EffectManager
535535 // Linux2.6.22.9=Not supported
536536 pEffect = new Effect (Effect::ConstantForce, Effect::Constant);
537537 pEffect->direction = Effect::North;
538- pEffect->trigger_button = 0 ;
538+ pEffect->trigger_button = 0 ;
539539 pEffect->trigger_interval = 0 ;
540- pEffect->replay_length = Effect::OIS_INFINITE; // Linux/Win32: Same behaviour as 0.
541- pEffect->replay_delay = 0 ;
540+ pEffect->replay_length = Effect::OIS_INFINITE; // Linux/Win32: Same behaviour as 0.
541+ pEffect->replay_delay = 0 ;
542542 pEffect->setNumAxes (1 );
543543 pConstForce = dynamic_cast <ConstantEffect*>(pEffect->getForceEffect ());
544544 pConstForce->level = 5000 ; // -10K to +10k
545545 pConstForce->envelope .attackLength = 0 ;
546546 pConstForce->envelope .attackLevel = (unsigned short )pConstForce->level ;
547547 pConstForce->envelope .fadeLength = 0 ;
548- pConstForce->envelope .fadeLevel = (unsigned short )pConstForce->level ;
548+ pConstForce->envelope .fadeLevel = (unsigned short )pConstForce->level ;
549549
550550 mapVars.clear ();
551551 mapVars[" Force" ] = new TriangleVariable (0.0 , // F0
@@ -568,17 +568,17 @@ class EffectManager
568568 // Linux2.6.22.9=Not supported.
569569 pEffect = new Effect (Effect::ConstantForce, Effect::Constant);
570570 pEffect->direction = Effect::North;
571- pEffect->trigger_button = 0 ;
571+ pEffect->trigger_button = 0 ;
572572 pEffect->trigger_interval = 0 ;
573- pEffect->replay_length = Effect::OIS_INFINITE; // (unsigned int)(1000000.0/_nUpdateFreq); // Linux: Does not work.
574- pEffect->replay_delay = 0 ;
573+ pEffect->replay_length = Effect::OIS_INFINITE; // (unsigned int)(1000000.0/_nUpdateFreq); // Linux: Does not work.
574+ pEffect->replay_delay = 0 ;
575575 pEffect->setNumAxes (1 );
576576 pConstForce = dynamic_cast <ConstantEffect*>(pEffect->getForceEffect ());
577577 pConstForce->level = 5000 ; // -10K to +10k
578578 pConstForce->envelope .attackLength = (unsigned int )(1000000.0 / _nUpdateFreq / 2 );
579579 pConstForce->envelope .attackLevel = (unsigned short )(pConstForce->level * 0.1 );
580580 pConstForce->envelope .fadeLength = 0 ; // Never reached, actually.
581- pConstForce->envelope .fadeLevel = (unsigned short )pConstForce->level ; // Idem
581+ pConstForce->envelope .fadeLevel = (unsigned short )pConstForce->level ; // Idem
582582
583583 mapVars.clear ();
584584 mapVars[" Force" ] = new TriangleVariable (0.0 , // F0
@@ -601,19 +601,19 @@ class EffectManager
601601 // Linux2.6.22.9=Failed.
602602 pEffect = new Effect (Effect::PeriodicForce, Effect::Triangle);
603603 pEffect->direction = Effect::North;
604- pEffect->trigger_button = 0 ;
604+ pEffect->trigger_button = 0 ;
605605 pEffect->trigger_interval = 0 ;
606- pEffect->replay_length = Effect::OIS_INFINITE;
607- pEffect->replay_delay = 0 ;
606+ pEffect->replay_length = Effect::OIS_INFINITE;
607+ pEffect->replay_delay = 0 ;
608608 pEffect->setNumAxes (1 );
609609 pPeriodForce = dynamic_cast <PeriodicEffect*>(pEffect->getForceEffect ());
610610 pPeriodForce->magnitude = 10000 ; // 0 to +10k
611611 pPeriodForce->offset = 0 ;
612612 pPeriodForce->phase = 0 ; // 0 to 35599
613613 pPeriodForce->period = 10000 ; // Micro-seconds
614614 pPeriodForce->envelope .attackLength = 0 ;
615- pPeriodForce->envelope .attackLevel = (unsigned short )pPeriodForce->magnitude ;
616- pPeriodForce->envelope .fadeLength = 0 ;
615+ pPeriodForce->envelope .attackLevel = (unsigned short )pPeriodForce->magnitude ;
616+ pPeriodForce->envelope .fadeLength = 0 ;
617617 pPeriodForce->envelope .fadeLevel = (unsigned short )pPeriodForce->magnitude ;
618618
619619 mapVars.clear ();
@@ -657,7 +657,7 @@ class EffectManager
657657 for (size_t nEffInd = 0 ; nEffInd < _vecEffects.size (); nEffInd++)
658658 {
659659 const Effect::EForce eForce = _vecEffects[nEffInd]->getFFEffect ()->force ;
660- const Effect::EType eType = _vecEffects[nEffInd]->getFFEffect ()->type ;
660+ const Effect::EType eType = _vecEffects[nEffInd]->getFFEffect ()->type ;
661661 if (_pJoystickMgr->getCurrentFFDevice ()->supportsEffect (eForce, eType))
662662 {
663663 _vecPlayableEffectInd.push_back (nEffInd);
@@ -683,8 +683,8 @@ class EffectManager
683683 }
684684
685685 enum EWhichEffect { ePrevious = -1 ,
686- eNone = 0 ,
687- eNext = +1 };
686+ eNone = 0 ,
687+ eNext = +1 };
688688
689689 void selectEffect (EWhichEffect eWhich)
690690 {
@@ -799,17 +799,17 @@ class Application
799799public:
800800 Application (int argc, const char * argv[])
801801 {
802- _pInputMgr = nullptr ;
803- _pEventHdlr = nullptr ;
804- _pKeyboard = nullptr ;
802+ _pInputMgr = nullptr ;
803+ _pEventHdlr = nullptr ;
804+ _pKeyboard = nullptr ;
805805 _pJoystickMgr = nullptr ;
806- _pEffectMgr = nullptr ;
806+ _pEffectMgr = nullptr ;
807807
808808#if defined OIS_WIN32_PLATFORM
809809 _hWnd = nullptr ;
810810#elif defined OIS_LINUX_PLATFORM
811811 _pXDisp = 0 ;
812- _xWin = 0 ;
812+ _xWin = 0 ;
813813#endif
814814
815815 _bMustStop = false ;
@@ -1048,12 +1048,12 @@ class Application
10481048
10491049EventHandler::EventHandler (Application* pApp) :
10501050 _pApplication(pApp)
1051- {}
1051+ { }
10521052
10531053void EventHandler::initialize (JoystickManager* pJoystickMgr, EffectManager* pEffectMgr)
10541054{
10551055 _pJoystickMgr = pJoystickMgr;
1056- _pEffectMgr = pEffectMgr;
1056+ _pEffectMgr = pEffectMgr;
10571057}
10581058
10591059bool EventHandler::keyPressed (const KeyEvent& arg)
0 commit comments