Add ATTR_ALWAYS_INLINE to Endianess helper functions to optimize generated code
authorStefan Hellermann <stefan@the2masters.de>
Wed, 30 Sep 2015 08:20:35 +0000 (10:20 +0200)
committerStefan Hellermann <stefan@the2masters.de>
Wed, 30 Sep 2015 08:20:35 +0000 (10:20 +0200)
Saves 68 Byte on RNDIS LowLevel Demo
Saves 48 Byte on RNDIS ClassDriver Demo

LUFA/Common/Endianness.h

index 865a767..ea6c182 100644 (file)
                         *
                         *  \return Input data with the individual bytes reversed.
                         */
                         *
                         *  \return Input data with the individual bytes reversed.
                         */
-                       static inline uint16_t SwapEndian_16(const uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
+                       static inline uint16_t SwapEndian_16(const uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
                        static inline uint16_t SwapEndian_16(const uint16_t Word)
                        {
                                if (GCC_IS_COMPILE_CONST(Word))
                        static inline uint16_t SwapEndian_16(const uint16_t Word)
                        {
                                if (GCC_IS_COMPILE_CONST(Word))
                         *
                         *  \return Input data with the individual bytes reversed.
                         */
                         *
                         *  \return Input data with the individual bytes reversed.
                         */
-                       static inline uint32_t SwapEndian_32(const uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
+                       static inline uint32_t SwapEndian_32(const uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
                        static inline uint32_t SwapEndian_32(const uint32_t DWord)
                        {
                                if (GCC_IS_COMPILE_CONST(DWord))
                        static inline uint32_t SwapEndian_32(const uint32_t DWord)
                        {
                                if (GCC_IS_COMPILE_CONST(DWord))