diff --git a/src/json_filter.cpp b/src/json_filter.cpp index 9c363af..b4ca9e1 100644 --- a/src/json_filter.cpp +++ b/src/json_filter.cpp @@ -1,6 +1,6 @@ #include "json_filter.h" -__attribute__((always_inline)) inline bool Contains(std::string_view str, const std::string &val) +constexpr bool Contains(std::string_view str, const std::string &val) { return str.find(val) != std::string::npos; } diff --git a/src/user_filter.cpp b/src/user_filter.cpp index 95d6bad..ed4fa9c 100644 --- a/src/user_filter.cpp +++ b/src/user_filter.cpp @@ -1,6 +1,6 @@ #include "user_filter.h" -inline bool ValidUsername(const std::string &name) noexcept +constexpr bool ValidUsername(const std::string &name) noexcept { if (name.size() < min_name_size || name.size() > max_name_size) {