mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Add non-const version of TypedMapping::operator->()
This commit is contained in:
parent
59a56a78c0
commit
e870b936c3
Notes:
sideshowbarker
2024-07-19 06:12:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e870b936c32
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue