Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2015, 11:40:28 AM (9 years ago)
Author:
muemart
Message:

Run clang-modernize -add-override
A few notes:

  • There are probably some overrides missing, especially in funky templatey code
  • Virtual methods with wrong signatures were not fixed, needs to be done by hand (only warnings get emitted)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h

    r8858 r10817  
    153153
    154154        //! Captures OIS events (which then get distributed to the derived class) and creates the button held events
    155         void update(const Clock& time)
     155        void update(const Clock& time) override
    156156        {
    157157            oisDevice_->capture();
     
    160160            for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)
    161161                for (unsigned int iS = 0; iS < inputStates_.size(); ++iS)
    162                     inputStates_[iS]->buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
     162                    inputStates_[iS]->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
    163163                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB]));
    164164
     
    171171
    172172        //! Clears the list of pressed buttons and calls the derived class's method
    173         void clearBuffers()
     173        void clearBuffers() override
    174174        {
    175175            pressedButtons_.clear();
     
    180180        OISDeviceClass* getOISDevice()   { return this->oisDevice_; }
    181181        // Returns the name of the derived class as string
    182         std::string getClassName() const { return DeviceClass::getClassNameImpl(); }
     182        std::string getClassName() const override { return DeviceClass::getClassNameImpl(); }
    183183
    184184    protected:
     
    197197            // Call states
    198198            for (unsigned int i = 0; i < inputStates_.size(); ++i)
    199                 inputStates_[i]->buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     199                inputStates_[i]->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    200200        }
    201201
     
    219219            // Call states
    220220            for (unsigned int i = 0; i < inputStates_.size(); ++i)
    221                 inputStates_[i]->buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     221                inputStates_[i]->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    222222        }
    223223
Note: See TracChangeset for help on using the changeset viewer.