Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 29, 2015, 4:47:42 PM (9 years ago)
Author:
landauf
Message:

use '= delete' to explicitly delete unimplemented copy-constructors (for non-copyable classes).
use '= default' to explicitly implement default constructors/destructors.

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

Legend:

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

    r10845 r10990  
    4747              trueKeyFalseChar_(trueKeyFalseChar), char_(_char), key_(key)
    4848        { }
    49         virtual ~BaseInputBufferListenerTuple() { }
     49        virtual ~BaseInputBufferListenerTuple() = default;
    5050        virtual void callFunction() = 0;
    5151        bool bListenToAllChanges_;
     
    6565              listener_(listener), function_(function)
    6666        { }
    67         virtual ~InputBufferListenerTuple() { }
     67        virtual ~InputBufferListenerTuple() = default;
    6868        virtual void callFunction() override
    6969        {
  • code/branches/cpp11_v2/src/libraries/core/input/InputCommands.h

    r10845 r10990  
    5757    public:
    5858        BaseCommand() : bFixedKeybindMode_(false) {}
    59         virtual ~BaseCommand() { }
     59        virtual ~BaseCommand() = default;
    6060
    6161        virtual bool execute(float abs = 1.0f, float rel = 1.0f) = 0;
  • code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h

    r10916 r10990  
    6060        //! Only resets the members
    6161        InputDevice(unsigned int id) : bCalibrating_(false), deviceID_(id) { }
    62         virtual ~InputDevice() { }
     62        virtual ~InputDevice() = default;
    6363        //! Returns the device class (derived) name as string
    6464        virtual std::string getClassName() const = 0;
     
    9999
    100100    private:
    101         InputDevice(const InputDevice& rhs); //!< Don't use!
     101        InputDevice(const InputDevice&) = delete;
    102102
    103103        bool bCalibrating_;                  //!< Whether the device is in calibration mode
  • code/branches/cpp11_v2/src/libraries/core/input/InputHandler.h

    r8729 r10990  
    119119    {
    120120    public:
    121         virtual ~InputHandler() { }
     121        virtual ~InputHandler() = default;
    122122
    123123        template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TPress)
  • code/branches/cpp11_v2/src/libraries/core/input/InputManager.h

    r10845 r10990  
    192192
    193193    private: // functions
    194         // don't mess with a Singleton
    195         InputManager(const InputManager&);
     194        InputManager(const InputManager&) = delete;
    196195
    197196        // Internal methods
  • code/branches/cpp11_v2/src/libraries/core/input/InputState.h

    r10845 r10990  
    155155    private:
    156156        InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority);
    157         ~InputState() { }
     157        ~InputState() = default;
    158158
    159159        virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override;
  • code/branches/cpp11_v2/src/libraries/core/input/JoyStick.h

    r10845 r10990  
    7070        //! Assigns a generated ID string and loads the calibration (if present)
    7171        JoyStick(unsigned int id, OIS::InputManager* oisInputManager);
    72         ~JoyStick() { }
     72        ~JoyStick() = default;
    7373        void setConfigValues();
    7474
  • code/branches/cpp11_v2/src/libraries/core/input/JoyStickQuantityListener.h

    r9667 r10990  
    4848    protected:
    4949        JoyStickQuantityListener();
    50         virtual ~JoyStickQuantityListener() { }
     50        virtual ~JoyStickQuantityListener() = default;
    5151
    5252        //! Returns a list with all JoySticks currently loaded
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h

    r10829 r10990  
    102102
    103103    private:
    104         KeyBinderManager(const KeyBinderManager&);
     104        KeyBinderManager(const KeyBinderManager&) = delete;
    105105        void keybindInternal(const std::string& command, bool bTemporary);
    106106        void keybindKeyPressed(const std::string& keyName);
  • code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.h

    r10845 r10990  
    4848
    4949    private:
    50         KeyDetector(const KeyDetector&);
     50        KeyDetector(const KeyDetector&) = delete;
    5151
    5252        void callback(const std::string& name);
  • code/branches/cpp11_v2/src/libraries/core/input/Keyboard.h

    r10845 r10990  
    6363        //! Only resets the keyboard modifiers. Initialising is done in the base class.
    6464        Keyboard(unsigned int id, OIS::InputManager* oisInputManager) : super(id, oisInputManager), modifiers_(0) { }
    65         ~Keyboard() { }
     65        ~Keyboard() = default;
    6666
    6767    private:
Note: See TracChangeset for help on using the changeset viewer.