summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-23 15:57:19 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-23 15:57:19 +0200
commite870b936c321369db7a59b402b4bab1d156a61ca (patch)
tree20603ac27edd778919bb807dea5a78948ca84b1d
parent59a56a78c059dffc411c2de20c22b6439e2909ce (diff)
downloadserenity-e870b936c321369db7a59b402b4bab1d156a61ca.zip
Kernel: Add non-const version of TypedMapping::operator->()
-rw-r--r--Kernel/VM/TypedMapping.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/VM/TypedMapping.h b/Kernel/VM/TypedMapping.h
index bac566a9e6..c0f8cf98b1 100644
--- a/Kernel/VM/TypedMapping.h
+++ b/Kernel/VM/TypedMapping.h
@@ -36,6 +36,7 @@ struct TypedMapping {
const T* ptr() const { return reinterpret_cast<const T*>(region->vaddr().offset(offset).as_ptr()); }
T* ptr() { return reinterpret_cast<T*>(region->vaddr().offset(offset).as_ptr()); }
const T* operator->() const { return ptr(); }
+ T* operator->() { return ptr(); }
const T& operator*() const { return *ptr(); }
T& operator*() { return *ptr(); }
OwnPtr<Region> region;