diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 15:39:26 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 15:39:26 +0100 |
commit | 3b2dcd5929316dae75147c84b243ae69a2101af5 (patch) | |
tree | e121ba2b1c6cb6fcdfd6d36c0392e3c15066ec17 /AK | |
parent | 862f108cb5cf0c3708f245aaf9620c674f371fa0 (diff) | |
download | serenity-3b2dcd5929316dae75147c84b243ae69a2101af5.zip |
Add a VMO pointer to VNode.
This way, if anyone tries to map an already mapped file, we share the VMO.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Function.h | 2 | ||||
-rw-r--r-- | AK/StdLib.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/AK/Function.h b/AK/Function.h index c95dd90311..fe50180517 100644 --- a/AK/Function.h +++ b/AK/Function.h @@ -87,7 +87,7 @@ private: }; template<typename CallableType> - class CallableWrapper : public CallableWrapperBase { + class CallableWrapper final : public CallableWrapperBase { public: explicit CallableWrapper(CallableType&& callable) : m_callable(move(callable)) diff --git a/AK/StdLib.h b/AK/StdLib.h index efe871f014..6d1d398dc2 100644 --- a/AK/StdLib.h +++ b/AK/StdLib.h @@ -28,9 +28,10 @@ inline T max(const T& a, const T& b) } -template<typename T> -static inline T ceilDiv(T a, T b) +template<typename T, typename U> +static inline T ceilDiv(T a, U b) { + static_assert(sizeof(T) == sizeof(U)); T result = a / b; if ((a % b) != 0) ++result; |