Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10778


Ignore:
Timestamp:
Nov 8, 2015, 3:12:17 PM (8 years ago)
Author:
landauf
Message:

use range-based-for-loop instead of BOOST_FOREACH

Location:
code/branches/cpp11_v2/src/libraries/core/input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc

    r10768 r10778  
    3939#include <ois/OISException.h>
    4040#include <ois/OISInputManager.h>
    41 #include <boost/foreach.hpp>
    4241#include <loki/ScopeGuard.h>
    4342
     
    310309        orxout(verbose, context::input) << "InputManager: Destroying devices..." << endl;
    311310
    312         BOOST_FOREACH(InputDevice*& device, devices_)
     311        for (InputDevice*& device : devices_)
    313312        {
    314313            if (device == nullptr)
     
    387386        // Capture all the input and collect the function calls
    388387        // No event gets triggered here yet!
    389         BOOST_FOREACH(InputDevice* device, devices_)
     388        for  (InputDevice* device : devices_)
    390389            if (device != nullptr)
    391390                device->update(time);
     
    466465    void InputManager::clearBuffers()
    467466    {
    468         BOOST_FOREACH(InputDevice* device, devices_)
     467        for (InputDevice* device : devices_)
    469468            if (device != nullptr)
    470469                device->clearBuffers();
     
    476475                        << "When done, put the axex in the middle position and press enter." << endl;
    477476
    478         BOOST_FOREACH(InputDevice* device, devices_)
     477        for (InputDevice* device : devices_)
    479478            if (device != nullptr)
    480479                device->startCalibration();
     
    487486    void InputManager::stopCalibration()
    488487    {
    489         BOOST_FOREACH(InputDevice* device, devices_)
     488        for (InputDevice* device : devices_)
    490489            if (device != nullptr)
    491490                device->stopCalibration();
  • code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc

    r10624 r10778  
    3131#include <climits>
    3232#include <ois/OISJoyStick.h>
    33 #include <boost/foreach.hpp>
    3433
    3534#include "util/StringUtils.h"
     
    7372        //deviceName_ += multi_cast<std::string>(oisDevice_->getNumberOfComponents(OIS::OIS_Vector3));
    7473
    75         BOOST_FOREACH(std::string& idString, deviceNames_s)
     74        for (const std::string& idString : deviceNames_s)
    7675        {
    7776            if (deviceName_ == idString)
     
    128127    {
    129128        // Set initial values
    130         BOOST_FOREACH(int& minVal, configMinValues_)
     129        for (int& minVal : configMinValues_)
    131130            minVal = INT_MAX;
    132         BOOST_FOREACH(int& minVal, configMaxValues_)
     131        for (int& minVal : configMaxValues_)
    133132            minVal = INT_MIN;
    134         BOOST_FOREACH(int& zeroVal, configZeroValues_)
     133        for (int& zeroVal : configZeroValues_)
    135134            zeroVal = 0;
    136135    }
     
    209208                fValue *= negativeCoeffs_[axis];
    210209
    211             BOOST_FOREACH(InputState* state, inputStates_)
     210            for (InputState* state : inputStates_)
    212211                state->joyStickAxisMoved(this->getDeviceID(), axis, fValue);
    213212        }
Note: See TracChangeset for help on using the changeset viewer.