mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
refactor: Remove static from constexpr functions in headers
Those functions have no need to be static in every TU. Also, static somewhat contradicts and overwrites the inline keyword. So remove the static, and just keep constexpr (which implies inline).
This commit is contained in:
@@ -46,7 +46,7 @@ enum class NetPermissionFlags : uint32_t {
|
||||
Implicit = (1U << 31),
|
||||
All = BloomFilter | ForceRelay | Relay | NoBan | Mempool | Download | Addr,
|
||||
};
|
||||
static inline constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
|
||||
constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
|
||||
{
|
||||
using t = std::underlying_type_t<NetPermissionFlags>;
|
||||
return static_cast<NetPermissionFlags>(static_cast<t>(a) | static_cast<t>(b));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace util {
|
||||
namespace detail {
|
||||
template <unsigned num_params>
|
||||
constexpr static void CheckNumFormatSpecifiers(const char* str)
|
||||
constexpr void CheckNumFormatSpecifiers(const char* str)
|
||||
{
|
||||
unsigned count_normal{0}; // Number of "normal" specifiers, like %s
|
||||
unsigned count_pos{0}; // Max number in positional specifier, like %8$s
|
||||
|
||||
Reference in New Issue
Block a user