diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 2e132a5a1e..a1cf752157 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -47,19 +47,19 @@ inline constexpr dword round_up_to_power_of_two(dword value, dword power_of_two) namespace AK { template -inline T min(const T& a, const T& b) +inline constexpr T min(const T& a, const T& b) { return a < b ? a : b; } template -inline T max(const T& a, const T& b) +inline constexpr T max(const T& a, const T& b) { return a < b ? b : a; } template -static inline T ceil_div(T a, U b) +inline constexpr T ceil_div(T a, U b) { static_assert(sizeof(T) == sizeof(U)); T result = a / b; diff --git a/AK/StringImpl.h b/AK/StringImpl.h index dbeb9d5ecf..b39e363750 100644 --- a/AK/StringImpl.h +++ b/AK/StringImpl.h @@ -66,7 +66,7 @@ private: char m_inline_buffer[0]; }; -inline dword string_hash(const char* characters, int length) +inline constexpr dword string_hash(const char* characters, int length) { dword hash = 0; for (int i = 0; i < length; ++i) {