summaryrefslogtreecommitdiff
path: root/AK/StdLibExtras.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-06-24 10:13:28 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-06-24 10:13:28 +0200
commit2dd54f062ab6d966c71e49052b16066863a6feaf (patch)
treeab9e998ca6d72c12db182fa4075640a6f5983604 /AK/StdLibExtras.h
parentbf97b9589d8008833091a04a1adbf80cb92275d4 (diff)
downloadserenity-2dd54f062ab6d966c71e49052b16066863a6feaf.zip
AK: Mark some helper things constexpr.
Diffstat (limited to 'AK/StdLibExtras.h')
-rw-r--r--AK/StdLibExtras.h6
1 files changed, 3 insertions, 3 deletions
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<typename T>
-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<typename T>
-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<typename T, typename U>
-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;