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:
MarcoFalke
2026-07-30 19:52:01 +02:00
parent d3cfd02bd7
commit fa6e1a1e85
2 changed files with 2 additions and 2 deletions

View File

@@ -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));

View File

@@ -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