Skip to content

Commit

Permalink
Merge pull request #61 from the2masters/always_inline
Browse files Browse the repository at this point in the history
Add ATTR_ALWAYS_INLINE to Endianess helper functions to optimize generated code (thanks to Stefan Hellermann).
  • Loading branch information
abcminiuser committed Sep 30, 2015
2 parents 7638128 + 43d993e commit a9f34b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LUFA/Common/Endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
*
* \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))
Expand Down Expand Up @@ -428,7 +428,7 @@
*
* \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))
Expand Down

0 comments on commit a9f34b5

Please sign in to comment.