Improved formatting

This commit is contained in:
BlackMark 2019-07-30 21:51:13 +02:00
parent 6861b8f5d1
commit f0a3cd6da8
2 changed files with 10 additions and 24 deletions

View File

@ -65,18 +65,11 @@ enum class ControlFlagsC0 {
MODE_SEL_1 = UMSEL01, MODE_SEL_1 = UMSEL01,
}; };
constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs) // clang-format off
{ constexpr int operator<<(const int &lhs, const ControlFlagsA0 &rhs) { return lhs << static_cast<int>(rhs); }
return lhs << static_cast<int>(rhs); constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) { return lhs << static_cast<int>(rhs); }
} constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) // clang-format on
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs)
{
return lhs << static_cast<int>(rhs);
}
#else #else
#error "This chip is not supported" #error "This chip is not supported"

View File

@ -52,18 +52,11 @@ enum class ControlFlagsC1 {
MODE_SEL_1 = UMSEL11, MODE_SEL_1 = UMSEL11,
}; };
constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs) // clang-format off
{ constexpr int operator<<(const int &lhs, const ControlFlagsA1 &rhs) { return lhs << static_cast<int>(rhs); }
return lhs << static_cast<int>(rhs); constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) { return lhs << static_cast<int>(rhs); }
} constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) { return lhs << static_cast<int>(rhs); }
constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) // clang-format on
{
return lhs << static_cast<int>(rhs);
}
constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs)
{
return lhs << static_cast<int>(rhs);
}
#define HAS_UART1 #define HAS_UART1