From f0a3cd6da8d6e7152064be2f1145cabba56c6e32 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Tue, 30 Jul 2019 21:51:13 +0200 Subject: [PATCH] Improved formatting --- hardware0.hpp | 17 +++++------------ hardware1.hpp | 17 +++++------------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/hardware0.hpp b/hardware0.hpp index e72868c..1f4820e 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -65,18 +65,11 @@ enum class ControlFlagsC0 { MODE_SEL_1 = UMSEL01, }; -constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs) -{ - return lhs << static_cast(rhs); -} -constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) -{ - return lhs << static_cast(rhs); -} -constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) -{ - return lhs << static_cast(rhs); -} +// clang-format off +constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs) { return lhs << static_cast(rhs); } +constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) { return lhs << static_cast(rhs); } +constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) { return lhs << static_cast(rhs); } +// clang-format on #else #error "This chip is not supported" diff --git a/hardware1.hpp b/hardware1.hpp index 3bb692d..66b0379 100644 --- a/hardware1.hpp +++ b/hardware1.hpp @@ -52,18 +52,11 @@ enum class ControlFlagsC1 { MODE_SEL_1 = UMSEL11, }; -constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs) -{ - return lhs << static_cast(rhs); -} -constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) -{ - return lhs << static_cast(rhs); -} -constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) -{ - return lhs << static_cast(rhs); -} +// clang-format off +constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs) { return lhs << static_cast(rhs); } +constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) { return lhs << static_cast(rhs); } +constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) { return lhs << static_cast(rhs); } +// clang-format on #define HAS_UART1