- replace all the auto keyword by the proper type kept the auto line in todo for reference :) - silent a few warnings
Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -262,7 +262,9 @@ glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { · 261 unmodified lines | |||
| 262 | 262 | ||
| 263 | AbstractInputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { | 263 | AbstractInputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { |
| 264 | // This is where we retreive the Device Tracker category and then the sub tracker within it | 264 | // This is where we retreive the Device Tracker category and then the sub tracker within it |
| 265 | auto icIt = _inputControllers.find(0); | 265 | //TODO C++11 auto icIt = _inputControllers.find(0); |
| 266 | InputControllerMap::iterator icIt = _inputControllers.find(0); | ||
| 267 | |||
| 266 | if (icIt != _inputControllers.end()) { | 268 | if (icIt != _inputControllers.end()) { |
| 267 | return (*icIt).second; | 269 | return (*icIt).second; |
| 268 | } else { | 270 | } else { |
| @@ -281,7 +283,7 @@ AbstractInputController* ControllerScriptingInterface::createInputController(con · 12 unmodified lines | |||
| 281 | MotionTracker* motionTracker = dynamic_cast< MotionTracker* > (DeviceTracker::getDevice(deviceID)); | 283 | MotionTracker* motionTracker = dynamic_cast< MotionTracker* > (DeviceTracker::getDevice(deviceID)); |
| 282 | if (motionTracker) { | 284 | if (motionTracker) { |
| 283 | MotionTracker::Index trackerID = motionTracker->findJointIndex(tracker.toStdString()); | 285 | MotionTracker::Index trackerID = motionTracker->findJointIndex(tracker.toStdString()); |
| 284 | if (trackerID > 0) { | 286 | if (trackerID >= 0) { |
| 285 | AbstractInputController* inputController = new InputController(deviceID, trackerID, this); | 287 | AbstractInputController* inputController = new InputController(deviceID, trackerID, this); |
| 286 | 288 | ||
| 287 | _inputControllers.insert(InputControllerMap::value_type(inputController->getKey(), inputController)); | 289 | _inputControllers.insert(InputControllerMap::value_type(inputController->getKey(), inputController)); |
| @@ -296,7 +298,8 @@ AbstractInputController* ControllerScriptingInterface::createInputController(con · 8 unmodified lines | |||
| 296 | } | 298 | } |
| 297 | 299 | ||
| 298 | void ControllerScriptingInterface::updateInputControllers() { | 300 | void ControllerScriptingInterface::updateInputControllers() { |
| 299 | for (auto it = _inputControllers.begin(); it != _inputControllers.end(); it++) { | 301 | //TODO C++11 for (auto it = _inputControllers.begin(); it != _inputControllers.end(); it++) { |
| 302 | for (InputControllerMap::iterator it = _inputControllers.begin(); it != _inputControllers.end(); it++) { | ||
| 300 | (*it).second->update(); | 303 | (*it).second->update(); |
| 301 | } | 304 | } |
| 302 | } | 305 | } |