From 04e9a44fb1c9aeea92c06217fecfe9a0b71a471c Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Fri, 8 Apr 2016 08:31:56 +0100 Subject: [PATCH] clang-format --- ArduinoButton.h | 6 ++---- ArduinoJoystick.h | 4 +--- ArduinoMatrixButton.h | 4 +--- IButton.cpp | 4 +--- IInputDevice.h | 4 +--- IJoystick.cpp | 4 +--- IJoystick.h | 2 +- IValueTransform.h | 6 ++---- LinearTransform.h | 6 ++---- UniversalInputManager.h | 8 ++++---- UniversalInputTypes.h | 4 ++-- 11 files changed, 18 insertions(+), 34 deletions(-) diff --git a/ArduinoButton.h b/ArduinoButton.h index f366bc1..40b3fc1 100644 --- a/ArduinoButton.h +++ b/ArduinoButton.h @@ -15,9 +15,7 @@ class ArduinoButton : public IButton ArduinoButton(inputid_t id, inputpin_t pin, bool activeLow = true, bool pullUp = true); - virtual ~ArduinoButton() - { - } + virtual ~ArduinoButton() {} /*! * \brief Gets the pin the button is attached to. @@ -43,7 +41,7 @@ class ArduinoButton : public IButton private: inputpin_t m_pin; //!< Pin button is attached to bool m_activeLow; //!< If the button logic is active low - bool m_pullUp; //!< If the button pin is pulled up + bool m_pullUp; //!< If the button pin is pulled up }; #endif diff --git a/ArduinoJoystick.h b/ArduinoJoystick.h index a7ecd59..311edb9 100644 --- a/ArduinoJoystick.h +++ b/ArduinoJoystick.h @@ -14,9 +14,7 @@ class ArduinoJoystick : public IJoystick public: ArduinoJoystick(inputid_t id, inputpin_t adc); - virtual ~ArduinoJoystick() - { - } + virtual ~ArduinoJoystick() {} protected: inputanalog_t getPhysicalValue() const; diff --git a/ArduinoMatrixButton.h b/ArduinoMatrixButton.h index 63e8878..55c6307 100644 --- a/ArduinoMatrixButton.h +++ b/ArduinoMatrixButton.h @@ -14,9 +14,7 @@ class ArduinoMatrixButton : public IButton public: ArduinoMatrixButton(inputid_t id, inputpin_t colPin, inputpin_t rowPin); - virtual ~ArduinoMatrixButton() - { - } + virtual ~ArduinoMatrixButton() {} /*! * \brief Gets the pin attached to the matrix column for this button. diff --git a/IButton.cpp b/IButton.cpp index aeed739..76aa4ee 100644 --- a/IButton.cpp +++ b/IButton.cpp @@ -16,9 +16,7 @@ IButton::IButton(inputid_t id, inputtime_t debounceDelay) { } -IButton::~IButton() -{ -} +IButton::~IButton() {} /*! * \brief Sets the debounce delay time. diff --git a/IInputDevice.h b/IInputDevice.h index eeaebef..2826b6f 100644 --- a/IInputDevice.h +++ b/IInputDevice.h @@ -23,9 +23,7 @@ class IInputDevice { } - virtual ~IInputDevice() - { - } + virtual ~IInputDevice() {} /*! * \brief Retrieves the ID of this device. diff --git a/IJoystick.cpp b/IJoystick.cpp index cfe939e..aa4fa8b 100644 --- a/IJoystick.cpp +++ b/IJoystick.cpp @@ -18,9 +18,7 @@ IJoystick::IJoystick(inputid_t id) setDeadbands(0, 0, 0); } -IJoystick::~IJoystick() -{ -} +IJoystick::~IJoystick() {} bool IJoystick::poll() { diff --git a/IJoystick.h b/IJoystick.h index da3caca..0816690 100644 --- a/IJoystick.h +++ b/IJoystick.h @@ -33,7 +33,7 @@ class IJoystick : public IInputDevice inputanalog_t getRawValue() const { return m_value; } inputanalog_t getCentredValue() const; - inputanalog_t getValue() const ; + inputanalog_t getValue() const; void setTransformation(IValueTransform *transform); diff --git a/IValueTransform.h b/IValueTransform.h index a4cddda..f742116 100644 --- a/IValueTransform.h +++ b/IValueTransform.h @@ -23,9 +23,7 @@ class IValueTransform { } - virtual ~IValueTransform() - { - }; + virtual ~IValueTransform(){}; /*! * \brief Perform the value transformation. @@ -35,7 +33,7 @@ class IValueTransform virtual inputanalog_t transform(inputanalog_t raw) const = 0; protected: - inputanalog_t m_fromLow; //!< Lowest input value + inputanalog_t m_fromLow; //!< Lowest input value inputanalog_t m_fromHigh; //!< Highest input value }; diff --git a/LinearTransform.h b/LinearTransform.h index d51088b..9deaa28 100644 --- a/LinearTransform.h +++ b/LinearTransform.h @@ -25,9 +25,7 @@ class LinearTransform : public IValueTransform { } - virtual ~LinearTransform() - { - } + virtual ~LinearTransform() {} /*! * \copydoc IValueTransform::transform @@ -41,7 +39,7 @@ class LinearTransform : public IValueTransform } private: - inputanalog_t m_toLow; //!< Lowest output value + inputanalog_t m_toLow; //!< Lowest output value inputanalog_t m_toHigh; //!< Highest output value }; diff --git a/UniversalInputManager.h b/UniversalInputManager.h index e59886c..d1316ac 100644 --- a/UniversalInputManager.h +++ b/UniversalInputManager.h @@ -13,7 +13,7 @@ */ struct UIMListNode { - UIMListNode *next; //!< Pointer to next node + UIMListNode *next; //!< Pointer to next node IInputDevice *device; //!< Pointer to input device }; @@ -54,12 +54,12 @@ class UniversalInputManager bool addNewJoystick(inputid_t id, inputpin_t pin); private: - size_t m_numDevices; //!< Number of added devices + size_t m_numDevices; //!< Number of added devices UIMListNode *m_listHead; //!< Pointer to the head node of the linked list IUniversalInputCallback *m_callback; //!< Callback handler - bool m_defaultActiveLow; //!< Default active low state for new buttons - bool m_defaultPullUp; //!< Default pull up state for new buttons + bool m_defaultActiveLow; //!< Default active low state for new buttons + bool m_defaultPullUp; //!< Default pull up state for new buttons inputtime_t m_defaultDebounce; //!< Defautl debounce time for new buttons }; diff --git a/UniversalInputTypes.h b/UniversalInputTypes.h index 72cb365..128c82b 100644 --- a/UniversalInputTypes.h +++ b/UniversalInputTypes.h @@ -36,9 +36,9 @@ typedef int32_t inputanalog_t; */ enum inputtype_t { - UIT_BUTTON, //!< Buttons inheriting from IButton + UIT_BUTTON, //!< Buttons inheriting from IButton UIT_JOYSTICK, //!< Joysticks inheriting from IJoystick - UIT_ENCODER //!< Encoders + UIT_ENCODER //!< Encoders }; #endif